diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 99d8d89..ff8be4c 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2008-08-05 P. A. Bagyenda + * Minor fix for crash in mmsproxy with bad message type 2008-07-18 P. A. Bagyenda * Improved scalability for mmsbox - multiple receive handlers for mmc incoming and sendmms interface 2008-07-15 P. A. Bagyenda @@ -39,7 +41,7 @@ * Normalisation of numbers inside messages as well * Added strip-prefixes config parameter 2008-04-18 P. A. Bagyenda - * Various memory leak fixes (thanks to Monachin Eric @ Skycore) + * Various memory leak fixes (thanks to Monchanin Eric @ Skycore) 2008-04-11 P. A. Bagyenda * Added no-sender-address config to mmsc section: Allows you to * suppress SenderAddress SOAP/XML tag diff --git a/mbuni/configure.ac b/mbuni/configure.ac index a1f6b61..5c875b6 100644 --- a/mbuni/configure.ac +++ b/mbuni/configure.ac @@ -45,6 +45,7 @@ dnl AC_CHECK_LIB([iconv], [libiconv], [LIBS="$LIBS -liconv"]) AC_CHECK_LIB([pthread], [pthread_create]) dnl AC_CHECK_LIB([xml2], [xmlStrcasecmp], [], dnl AC_MSG_ERROR([LibXML2 is required])) +AC_CHECK_FUNCS([backtrace]) dnl Checks for header files. AC_HEADER_DIRENT diff --git a/mbuni/extras/pgsql-queue/Makefile b/mbuni/extras/pgsql-queue/Makefile index 7ddfcfd..6806532 100644 --- a/mbuni/extras/pgsql-queue/Makefile +++ b/mbuni/extras/pgsql-queue/Makefile @@ -34,8 +34,8 @@ POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -build_triplet = i386-apple-darwin9.3.0 -host_triplet = i386-apple-darwin9.3.0 +build_triplet = i386-apple-darwin9.4.0 +host_triplet = i386-apple-darwin9.4.0 subdir = extras/pgsql-queue DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -86,7 +86,7 @@ BUILD_PGSQLQ_FALSE = # BUILD_PGSQLQ_TRUE = CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -I/usr/local/pgsql/include -g -O2 -DDARWIN=1 -O4 -Wall -I/usr/include/openssl -I/usr/local/include/kannel -g -O2 -DDARWIN=1 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include -I/sw/include/libxml2 -I/sw/include -I/usr/include/openssl +CFLAGS = -I/usr/local/pgsql/include -g -O2 -DDARWIN=1 -O4 -Wall -D_LARGE_FILES= -I/usr/include/openssl -I/usr/local/include/kannel -g -DDARWIN=1 -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib -I/Developer/SDKs/MacOSX10.4u.sdk/usr/include -I/sw/include/libxml2 -I/sw/include -I/usr/include/openssl CPP = gcc -E CPPFLAGS = CXX = g++ @@ -135,7 +135,7 @@ RANLIB = ranlib SET_MAKE = SHELL = /bin/sh STRIP = strip -VERSION = 1.4.0 +VERSION = cvs-20080718 ac_ct_CC = gcc ac_ct_CXX = g++ ac_ct_F77 = @@ -149,20 +149,20 @@ am__quote = am__tar = ${AMTAR} chof - "$$tardir" am__untar = ${AMTAR} xf - bindir = ${exec_prefix}/bin -build = i386-apple-darwin9.3.0 +build = i386-apple-darwin9.4.0 build_alias = build_cpu = i386 -build_os = darwin9.3.0 +build_os = darwin9.4.0 build_vendor = apple datadir = ${datarootdir} datarootdir = ${prefix}/share docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} dvidir = ${docdir} exec_prefix = ${prefix} -host = i386-apple-darwin9.3.0 +host = i386-apple-darwin9.4.0 host_alias = host_cpu = i386 -host_os = darwin9.3.0 +host_os = darwin9.4.0 host_vendor = apple htmldir = ${docdir} includedir = ${prefix}/include diff --git a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c index 2920dbd..5fe32d8 100644 --- a/mbuni/extras/pgsql-queue/mms_pgsql_queue.c +++ b/mbuni/extras/pgsql-queue/mms_pgsql_queue.c @@ -907,10 +907,9 @@ static void pgq_queue_run(char *dir, info(0, "pgsql_queue: Queue runner on [%s] shutdown, started...", dir); gwlist_remove_producer(items_list); -#if 0 for (i=0;iip); - +{ octstr_destroy(h->ip); octstr_destroy(h->url); octstr_destroy(h->ua); @@ -599,7 +595,5 @@ void free_mmsbox_http_clientInfo(MmsBoxHTTPClientInfo *h, int freeh) http_destroy_cgiargs(h->cgivars); http_destroy_headers(h->headers); - if (freeh) gw_free(h); - - debug("free info", 0, " left free_clientinfo"); + if (freeh) gw_free(h); } diff --git a/mbuni/mmsc/mmsproxy.c b/mbuni/mmsc/mmsproxy.c index 8efaab2..8264101 100644 --- a/mbuni/mmsc/mmsproxy.c +++ b/mbuni/mmsc/mmsproxy.c @@ -500,7 +500,7 @@ static void sendmms_proxy(MmsHTTPClientInfo *h) char *notify_cmd = NULL, tbuf[64]; int msize = h->body ? octstr_len(h->body) : 0; List *qh = http_create_empty_headers(); - + char *xmtype; debug("proxy.sendinterface", 0, " --> Enterred sendmms interface, blen=%d <--- ", @@ -512,8 +512,10 @@ static void sendmms_proxy(MmsHTTPClientInfo *h) if (!h->body) { /* A body is required. */ http_header_add(rh, "Content-Type", "text/plain"); hstatus = HTTP_BAD_REQUEST; - reply_body = octstr_format("Unexpected MMS message[%s], no body?", - mms_message_type_to_cstr(mtype)); + + xmtype = (void *)mms_message_type_to_cstr(mtype); + reply_body = octstr_format("Unexpected MMS message[%d: %s], no body?", + mtype, xmtype ? xmtype : "(null)"); goto done; } @@ -1482,7 +1484,9 @@ static void sendmms_proxy(MmsHTTPClientInfo *h) http_header_add(rh, "Content-Type", "text/plain"); ctype_set = 1; hstatus = HTTP_FORBIDDEN; - reply_body = octstr_format("Unexpected MMS message type %s", mms_message_type_to_cstr(mtype)); + xmtype = (void *)mms_message_type_to_cstr(mtype); + reply_body = octstr_format("Unexpected MMS message type %s [%d]", + xmtype ? xmtype : "(null)", mtype); break; }