From 1b08584a1a2438ce090345d0602dee945bf92b70 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 1 Apr 2005 10:21:53 +0000 Subject: [PATCH] Minor bug fixes. --- mbuni/mmlib/mms_util.c | 10 ++++------ mbuni/mmsc/mmsproxy.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/mbuni/mmlib/mms_util.c b/mbuni/mmlib/mms_util.c index fb396af..3adbc58 100644 --- a/mbuni/mmlib/mms_util.c +++ b/mbuni/mmlib/mms_util.c @@ -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); diff --git a/mbuni/mmsc/mmsproxy.c b/mbuni/mmsc/mmsproxy.c index ca65104..6b4fe7d 100644 --- a/mbuni/mmsc/mmsproxy.c +++ b/mbuni/mmsc/mmsproxy.c @@ -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);