diff --git a/mbuni/extras/pgsql-queue/Makefile b/mbuni/extras/pgsql-queue/Makefile index e966fe5..b0a759f 100644 --- a/mbuni/extras/pgsql-queue/Makefile +++ b/mbuni/extras/pgsql-queue/Makefile @@ -13,7 +13,7 @@ ifeq ($(ARCH),Darwin) LIB_EXT=dylib CFLAGS+=-DDARWIN=1 -arch ppc -arch i386 else - XLDFLAGS=-shared + XLDFLAGS=-shared -Wl,-undefined,suppress LIB_EXT=so endif diff --git a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c index fe10b77..7ebd738 100644 --- a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c +++ b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c @@ -42,8 +42,13 @@ static int pgq_init_module(Octstr *conninfo) gwlist_add_producer(free_conns); for (i = 0; imms_detokenizefuncs->mms_gettoken == NULL || m->mms_detokenizefuncs->mms_detokenizer_fini == NULL) panic(0, "Missing or NULL functions in detokenizer module!"); - if (m->mms_detokenizefuncs->mms_detokenizer_init(octstr_get_cstr(m->detokenizer_params))) + if (m->mms_detokenizefuncs->mms_detokenizer_init(octstr_get_cstr(m->detokenizer_params)) != 0) panic(0, "Detokenizer module failed to initialize"); } else m->mms_detokenizefuncs = NULL; @@ -466,18 +466,15 @@ Octstr *mms_find_sender_msisdn(Octstr *send_url, Octstr *phonenum = http_header_value(request_hdrs, msisdn_header); - if (!phonenum || octstr_len(phonenum) == 0) { + if (phonenum == NULL || octstr_len(phonenum) == 0) { List *l = octstr_split(send_url, octstr_imm("/")); + int len = gwlist_len(l); Octstr *xip = http_header_value(request_hdrs, requestip_header); - int len = gwlist_len(l); - if (xip == NULL) xip = ip ? octstr_duplicate(ip) : NULL; if (detokenizerfuncs && (len > 1 || xip)) - phonenum = detokenizerfuncs->mms_detokenize(len > 1 ? - gwlist_get(l, len - 1) : - send_url, + phonenum = detokenizerfuncs->mms_detokenize(len > 1 ? gwlist_get(l, len - 1) : send_url, xip); gwlist_destroy(l, (gwlist_item_destructor_t *)octstr_destroy); diff --git a/mbuni/mmsc/mmsproxy.c b/mbuni/mmsc/mmsproxy.c index 420217b..dac705e 100644 --- a/mbuni/mmsc/mmsproxy.c +++ b/mbuni/mmsc/mmsproxy.c @@ -191,10 +191,11 @@ int main(int argc, char *argv[]) debug("mmsproxy", 0, - " Request, ip=%s, base_client_addr=%s, client_addr=%s ", + " Request, ip=%s, base_client_addr=%s, client_addr=%s, url=%s ", h.ip ? octstr_get_cstr(h.ip) : "", h.base_client_addr ? octstr_get_cstr(h.base_client_addr) : "", - h.client_addr ? octstr_get_cstr(h.client_addr) : ""); + h.client_addr ? octstr_get_cstr(h.client_addr) : "", + octstr_get_cstr(h.url)); /* Dump headers, url etc. */ #if 0