1
0
Fork 0

Further cleanups for MM7/Soap and mmsbox - better error reporting, better xml content

This commit is contained in:
bagyenda 2006-03-28 08:37:25 +00:00
parent dde519afc2
commit 83d1c98991
2 changed files with 7 additions and 2 deletions

View File

@ -359,7 +359,7 @@ static void output_rcpt(char *hdr, List *hdrs, Octstr *p)
/* Construct by hand. */
Octstr *headers_to_soapxml(List *hdrs)
{
Octstr *s = octstr_create("<?xml version=\"1.0\" ?>\n");
Octstr *s = octstr_create("<?xml version='1.0' encoding='UTF-8'?>\n");
Octstr *p, *q, *r, *fault, *mtype;
int i, n;
time_t t;

View File

@ -560,11 +560,16 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to,
if ((s = mm7_soap_header_value(mresp, octstr_imm("StatusCode"))) != NULL) {
tstatus = atoi(octstr_get_cstr(s));
octstr_destroy(s);
} else
} else if ((s = mm7_soap_header_value(mresp, octstr_imm("faultstring"))) != NULL) {
tstatus = atoi(octstr_get_cstr(s));
octstr_destroy(s);
} else
tstatus = MM7_SOAP_FORMAT_CORRUPT;
if (!MM7_SOAP_STATUS_OK(tstatus)) {
Octstr *detail = mm7_soap_header_value(mresp, octstr_imm("Details"));
if (detail == NULL)
mm7_soap_header_value(mresp, octstr_imm("faultcode"));
ret = NULL;
info(0, "Send to MMSC[%s], failed, code=[%d=>%s], detail=%s",
mmc ? octstr_get_cstr(mmc->id) : "",