Further cleanups for MM7/Soap and mmsbox - better error reporting, better xml content
This commit is contained in:
parent
dde519afc2
commit
83d1c98991
|
@ -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;
|
||||
|
|
|
@ -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) : "",
|
||||
|
|
Loading…
Reference in New Issue