Minor bug fixes.
This commit is contained in:
parent
819a40ca9c
commit
1b08584a1a
|
@ -292,11 +292,10 @@ Octstr *mms_find_sender_msisdn(Octstr **send_url, List *request_hdrs, Octstr *ms
|
|||
int i, n = list_len(l);
|
||||
Octstr *s;
|
||||
|
||||
if (detokenizerfuncs) {
|
||||
if (detokenizerfuncs)
|
||||
phonenum = detokenizerfuncs->mms_detokenize(list_get(l, list_len(l) - 1));
|
||||
} else {
|
||||
else
|
||||
phonenum = octstr_duplicate(list_get(l, list_len(l) - 1));
|
||||
}
|
||||
|
||||
/* After getting it, remove it from the end... */
|
||||
for (i = 0, s = octstr_create(""); i < n-1; i++) {
|
||||
|
@ -304,9 +303,8 @@ Octstr *mms_find_sender_msisdn(Octstr **send_url, List *request_hdrs, Octstr *ms
|
|||
if (octstr_len(p) > 0)
|
||||
octstr_format_append(s, "/%S", p);
|
||||
}
|
||||
octstr_destroy(xsend_url);
|
||||
octstr_destroy(send_url);
|
||||
*send_url = s;
|
||||
|
||||
}
|
||||
if (l)
|
||||
list_destroy(l, (list_item_destructor_t *)octstr_destroy);
|
||||
|
@ -322,7 +320,7 @@ Octstr *mms_find_sender_ip(List *request_hdrs, Octstr *ip_header, Octstr *ip, in
|
|||
Octstr *client_ip = http_header_value(request_hdrs, ip_header);
|
||||
char *s;
|
||||
|
||||
xip = client_ip ? client_ip : ip;
|
||||
xip = client_ip ? client_ip : octstr_duplicate(ip);
|
||||
|
||||
s = octstr_get_cstr(xip);
|
||||
|
||||
|
|
|
@ -153,9 +153,9 @@ int main(int argc, char *argv[])
|
|||
h.ip, &ipv6);
|
||||
h.client_addr = octstr_format("%S/TYPE=IPv%s",
|
||||
h.base_client_addr, ipv6 ? "6" : "4");
|
||||
} else {
|
||||
} else
|
||||
h.client_addr = NULL;
|
||||
}
|
||||
|
||||
} else {
|
||||
normalize_number(octstr_get_cstr(settings->unified_prefix), &h.base_client_addr);
|
||||
h.client_addr = octstr_format("%S/TYPE=PLMN", h.base_client_addr);
|
||||
|
|
Loading…
Reference in New Issue