minor fixes to mm7 error reporting
This commit is contained in:
parent
7eec5761a1
commit
f0a3e8a350
|
@ -579,8 +579,8 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to,
|
||||||
service_code,
|
service_code,
|
||||||
linkedid,
|
linkedid,
|
||||||
1, octstr_get_cstr(mmc->id), vasid)) == NULL) {
|
1, octstr_get_cstr(mmc->id), vasid)) == NULL) {
|
||||||
*error = octstr_format("Failed to convert Msg[%s] 2 SOAP message!",
|
*error = octstr_format("Failed to convert Msg[%S] 2 SOAP message!",
|
||||||
mms_message_type_to_cstr(mtype));
|
mms_message_type_to_string(mtype));
|
||||||
goto done1;
|
goto done1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -594,15 +594,14 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to,
|
||||||
|
|
||||||
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph,&rbody);
|
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph,&rbody);
|
||||||
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||||
*error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned status=[%d]!",
|
*error = octstr_format("Failed to contact MMC[url=%S] => HTTP returned status=[%d]!",
|
||||||
octstr_get_cstr(mmc->mmsc_url), hstatus);
|
mmc->mmsc_url, hstatus);
|
||||||
goto done1;
|
goto done1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mresp = mm7_parse_soap(ph, rbody)) == NULL) {
|
if ((mresp = mm7_parse_soap(ph, rbody)) == NULL) {
|
||||||
*error = octstr_format("Failed to parse MMSC[url=%s, id=%s] response!",
|
*error = octstr_format("Failed to parse MMSC[url=%S, id=%S] response!",
|
||||||
octstr_get_cstr(mmc->mmsc_url),
|
mmc->mmsc_url, mmc->id);
|
||||||
octstr_get_cstr(mmc->id));
|
|
||||||
goto done1;
|
goto done1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,19 +617,20 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to,
|
||||||
|
|
||||||
if (!MM7_SOAP_STATUS_OK(tstatus) && tstatus != MM7_SOAP_COMMAND_REJECTED) {
|
if (!MM7_SOAP_STATUS_OK(tstatus) && tstatus != MM7_SOAP_COMMAND_REJECTED) {
|
||||||
Octstr *detail = mm7_soap_header_value(mresp, octstr_imm("Details"));
|
Octstr *detail = mm7_soap_header_value(mresp, octstr_imm("Details"));
|
||||||
|
char *tmp = (char *)mms_soap_status_to_cstr(tstatus);
|
||||||
if (detail == NULL)
|
if (detail == NULL)
|
||||||
detail = mm7_soap_header_value(mresp, octstr_imm("faultcode"));
|
detail = mm7_soap_header_value(mresp, octstr_imm("faultcode"));
|
||||||
ret = NULL;
|
ret = NULL;
|
||||||
info(0, "Send to MMSC[%s], failed, code=[%d=>%s], detail=[%s]",
|
info(0, "Send to MMSC[%s], failed, code=[%d=>%s], detail=[%s]",
|
||||||
mmc ? octstr_get_cstr(mmc->id) : "",
|
mmc ? octstr_get_cstr(mmc->id) : "",
|
||||||
tstatus, mms_soap_status_to_cstr(tstatus),
|
tstatus, tmp ? tmp : "(null)",
|
||||||
detail ? octstr_get_cstr(detail) : "(empty)");
|
detail ? octstr_get_cstr(detail) : "(empty)");
|
||||||
|
|
||||||
*error = octstr_format("Failed to deliver to MMC[url=%s, id=%s], status=[%d=>%s]!",
|
*error = octstr_format("Failed to deliver to MMC[url=%s, id=%s], status=[%d=>%s]!",
|
||||||
octstr_get_cstr(mmc->mmsc_url),
|
octstr_get_cstr(mmc->mmsc_url),
|
||||||
octstr_get_cstr(mmc->id),
|
octstr_get_cstr(mmc->id),
|
||||||
tstatus,
|
tstatus,
|
||||||
mms_soap_status_to_cstr(tstatus));
|
tmp ? tmp : "(null)");
|
||||||
|
|
||||||
octstr_destroy(detail);
|
octstr_destroy(detail);
|
||||||
} else {
|
} else {
|
||||||
|
@ -708,8 +708,8 @@ static Octstr *mm7eaif_send(MmscGrp *mmc, Octstr *from, Octstr *to,
|
||||||
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph, &rbody);
|
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph, &rbody);
|
||||||
|
|
||||||
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||||
*error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned status = %d !",
|
*error = octstr_format("Failed to contact MMC[url=%S] => HTTP returned status = %d !",
|
||||||
octstr_get_cstr(mmc->mmsc_url), hstatus);
|
mmc->mmsc_url, hstatus);
|
||||||
} else {
|
} else {
|
||||||
MmsMsg *mresp = rbody ? mms_frombinary(rbody, octstr_imm("anon@anon")) : NULL;
|
MmsMsg *mresp = rbody ? mms_frombinary(rbody, octstr_imm("anon@anon")) : NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue