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,
|
||||
linkedid,
|
||||
1, octstr_get_cstr(mmc->id), vasid)) == NULL) {
|
||||
*error = octstr_format("Failed to convert Msg[%s] 2 SOAP message!",
|
||||
mms_message_type_to_cstr(mtype));
|
||||
*error = octstr_format("Failed to convert Msg[%S] 2 SOAP message!",
|
||||
mms_message_type_to_string(mtype));
|
||||
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);
|
||||
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||
*error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned status=[%d]!",
|
||||
octstr_get_cstr(mmc->mmsc_url), hstatus);
|
||||
*error = octstr_format("Failed to contact MMC[url=%S] => HTTP returned status=[%d]!",
|
||||
mmc->mmsc_url, hstatus);
|
||||
goto done1;
|
||||
}
|
||||
|
||||
if ((mresp = mm7_parse_soap(ph, rbody)) == NULL) {
|
||||
*error = octstr_format("Failed to parse MMSC[url=%s, id=%s] response!",
|
||||
octstr_get_cstr(mmc->mmsc_url),
|
||||
octstr_get_cstr(mmc->id));
|
||||
*error = octstr_format("Failed to parse MMSC[url=%S, id=%S] response!",
|
||||
mmc->mmsc_url, mmc->id);
|
||||
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) {
|
||||
Octstr *detail = mm7_soap_header_value(mresp, octstr_imm("Details"));
|
||||
char *tmp = (char *)mms_soap_status_to_cstr(tstatus);
|
||||
if (detail == NULL)
|
||||
detail = 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) : "",
|
||||
tstatus, mms_soap_status_to_cstr(tstatus),
|
||||
tstatus, tmp ? tmp : "(null)",
|
||||
detail ? octstr_get_cstr(detail) : "(empty)");
|
||||
|
||||
*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->id),
|
||||
tstatus,
|
||||
mms_soap_status_to_cstr(tstatus));
|
||||
tmp ? tmp : "(null)");
|
||||
|
||||
octstr_destroy(detail);
|
||||
} 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);
|
||||
|
||||
if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
|
||||
*error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned status = %d !",
|
||||
octstr_get_cstr(mmc->mmsc_url), hstatus);
|
||||
*error = octstr_format("Failed to contact MMC[url=%S] => HTTP returned status = %d !",
|
||||
mmc->mmsc_url, hstatus);
|
||||
} else {
|
||||
MmsMsg *mresp = rbody ? mms_frombinary(rbody, octstr_imm("anon@anon")) : NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue