Improvements to mmsproxy (do not free NULL Octstr)
This commit is contained in:
parent
189e6e8b73
commit
c5c0cab256
|
@ -715,12 +715,13 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
||||||
sscanf(octstr_get_cstr(s), "%d", &n);
|
sscanf(octstr_get_cstr(s), "%d", &n);
|
||||||
octstr_destroy(s);
|
octstr_destroy(s);
|
||||||
}
|
}
|
||||||
|
if (pdate) {
|
||||||
s = octstr_format("%d%S", n+1, pdate);
|
s = octstr_format("%d%S", n+1, pdate);
|
||||||
mms_replace_header_value(mfwd,
|
mms_replace_header_value(mfwd,
|
||||||
"X-Mms-Previously-Sent-Date",
|
"X-Mms-Previously-Sent-Date",
|
||||||
octstr_get_cstr(s));
|
octstr_get_cstr(s));
|
||||||
octstr_destroy(pdate);
|
octstr_destroy(pdate);
|
||||||
|
}
|
||||||
if (delivery_report &&
|
if (delivery_report &&
|
||||||
octstr_case_compare(delivery_report, octstr_imm("Yes")) == 0)
|
octstr_case_compare(delivery_report, octstr_imm("Yes")) == 0)
|
||||||
dlr = 1;
|
dlr = 1;
|
||||||
|
@ -822,12 +823,15 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
||||||
0,
|
0,
|
||||||
octstr_get_cstr(settings->global_queuedir),
|
octstr_get_cstr(settings->global_queuedir),
|
||||||
settings->host_alias);
|
settings->host_alias);
|
||||||
|
if (x)
|
||||||
octstr_destroy(x);
|
octstr_destroy(x);
|
||||||
|
|
||||||
list_destroy(l, NULL);
|
list_destroy(l, NULL);
|
||||||
mms_destroy(mrep);
|
mms_destroy(mrep);
|
||||||
}
|
}
|
||||||
|
if (pfrom)
|
||||||
octstr_destroy(pfrom);
|
octstr_destroy(pfrom);
|
||||||
|
if (pdelivery_report)
|
||||||
octstr_destroy(pdelivery_report);
|
octstr_destroy(pdelivery_report);
|
||||||
if (pmsgid)
|
if (pmsgid)
|
||||||
octstr_destroy(pmsgid);
|
octstr_destroy(pmsgid);
|
||||||
|
@ -942,6 +946,7 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
||||||
0,
|
0,
|
||||||
octstr_get_cstr(settings->global_queuedir),
|
octstr_get_cstr(settings->global_queuedir),
|
||||||
settings->host_alias);
|
settings->host_alias);
|
||||||
|
if (x)
|
||||||
octstr_destroy(x);
|
octstr_destroy(x);
|
||||||
|
|
||||||
list_destroy(l, (list_item_destructor_t *)octstr_destroy);
|
list_destroy(l, (list_item_destructor_t *)octstr_destroy);
|
||||||
|
@ -999,6 +1004,7 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
|
||||||
/* Log to access log */
|
/* Log to access log */
|
||||||
mms_log("ReadReport", h->client_addr, NULL, msize, NULL, NULL, NULL, "MM1", h->ua,NULL);
|
mms_log("ReadReport", h->client_addr, NULL, msize, NULL, NULL, NULL, "MM1", h->ua,NULL);
|
||||||
|
|
||||||
|
if (x)
|
||||||
octstr_destroy(x);
|
octstr_destroy(x);
|
||||||
|
|
||||||
mdone2:
|
mdone2:
|
||||||
|
@ -1581,7 +1587,7 @@ static void mm7soap_dispatch(MmsHTTPClientInfo *h)
|
||||||
mm7_get_envelope(mreq, &from, &to, &subject, &vasid, &expiryt, &delivert);
|
mm7_get_envelope(mreq, &from, &to, &subject, &vasid, &expiryt, &delivert);
|
||||||
m = mm7_soap_to_mmsmsg(mreq, sender);
|
m = mm7_soap_to_mmsmsg(mreq, sender);
|
||||||
if (m) {
|
if (m) {
|
||||||
Octstr *value;
|
Octstr *value = NULL;
|
||||||
int dlr;
|
int dlr;
|
||||||
|
|
||||||
value = mms_get_header_value(m, octstr_imm("X-Mms-Delivery-Report"));
|
value = mms_get_header_value(m, octstr_imm("X-Mms-Delivery-Report"));
|
||||||
|
@ -1606,8 +1612,9 @@ static void mm7soap_dispatch(MmsHTTPClientInfo *h)
|
||||||
octstr_get_cstr(settings->global_queuedir),
|
octstr_get_cstr(settings->global_queuedir),
|
||||||
settings->host_alias);
|
settings->host_alias);
|
||||||
msgid = mms_maketransid(octstr_get_cstr(qf), settings->host_alias);
|
msgid = mms_maketransid(octstr_get_cstr(qf), settings->host_alias);
|
||||||
mms_log("Received", sender, to, -1, msgid, h->vasp->id, NULL, "MM7", h->ua, NULL);
|
mms_log("Received", sender, to, -1, msgid, h->vasp->id, NULL, "MM7",
|
||||||
|
h->ua, NULL);
|
||||||
|
if (value)
|
||||||
octstr_destroy(value);
|
octstr_destroy(value);
|
||||||
} else
|
} else
|
||||||
status = 4001;
|
status = 4001;
|
||||||
|
|
Loading…
Reference in New Issue