1
0
Fork 0

minor fix -- mmsproxy

This commit is contained in:
bagyenda 2008-08-05 05:21:34 +00:00
parent d63cc82ea8
commit 13e9649091
7 changed files with 24 additions and 24 deletions

View File

@ -1,3 +1,5 @@
2008-08-05 P. A. Bagyenda <bagyenda@dsmagic.com>
* Minor fix for crash in mmsproxy with bad message type
2008-07-18 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-07-18 P. A. Bagyenda <bagyenda@dsmagic.com>
* Improved scalability for mmsbox - multiple receive handlers for mmc incoming and sendmms interface * Improved scalability for mmsbox - multiple receive handlers for mmc incoming and sendmms interface
2008-07-15 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-07-15 P. A. Bagyenda <bagyenda@dsmagic.com>
@ -39,7 +41,7 @@
* Normalisation of numbers inside messages as well * Normalisation of numbers inside messages as well
* Added strip-prefixes config parameter * Added strip-prefixes config parameter
2008-04-18 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-04-18 P. A. Bagyenda <bagyenda@dsmagic.com>
* Various memory leak fixes (thanks to Monachin Eric @ Skycore) * Various memory leak fixes (thanks to Monchanin Eric @ Skycore)
2008-04-11 P. A. Bagyenda <bagyenda@dsmagic.com> 2008-04-11 P. A. Bagyenda <bagyenda@dsmagic.com>
* Added no-sender-address config to mmsc section: Allows you to * Added no-sender-address config to mmsc section: Allows you to
* suppress SenderAddress SOAP/XML tag * suppress SenderAddress SOAP/XML tag

View File

@ -45,6 +45,7 @@ dnl AC_CHECK_LIB([iconv], [libiconv], [LIBS="$LIBS -liconv"])
AC_CHECK_LIB([pthread], [pthread_create]) AC_CHECK_LIB([pthread], [pthread_create])
dnl AC_CHECK_LIB([xml2], [xmlStrcasecmp], [], dnl AC_CHECK_LIB([xml2], [xmlStrcasecmp], [],
dnl AC_MSG_ERROR([LibXML2 is required])) dnl AC_MSG_ERROR([LibXML2 is required]))
AC_CHECK_FUNCS([backtrace])
dnl Checks for header files. dnl Checks for header files.
AC_HEADER_DIRENT AC_HEADER_DIRENT

View File

@ -34,8 +34,8 @@ POST_INSTALL = :
NORMAL_UNINSTALL = : NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
build_triplet = i386-apple-darwin9.3.0 build_triplet = i386-apple-darwin9.4.0
host_triplet = i386-apple-darwin9.3.0 host_triplet = i386-apple-darwin9.4.0
subdir = extras/pgsql-queue subdir = extras/pgsql-queue
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@ -86,7 +86,7 @@ BUILD_PGSQLQ_FALSE = #
BUILD_PGSQLQ_TRUE = BUILD_PGSQLQ_TRUE =
CC = gcc CC = gcc
CCDEPMODE = depmode=gcc3 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 CPP = gcc -E
CPPFLAGS = CPPFLAGS =
CXX = g++ CXX = g++
@ -135,7 +135,7 @@ RANLIB = ranlib
SET_MAKE = SET_MAKE =
SHELL = /bin/sh SHELL = /bin/sh
STRIP = strip STRIP = strip
VERSION = 1.4.0 VERSION = cvs-20080718
ac_ct_CC = gcc ac_ct_CC = gcc
ac_ct_CXX = g++ ac_ct_CXX = g++
ac_ct_F77 = ac_ct_F77 =
@ -149,20 +149,20 @@ am__quote =
am__tar = ${AMTAR} chof - "$$tardir" am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf - am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin bindir = ${exec_prefix}/bin
build = i386-apple-darwin9.3.0 build = i386-apple-darwin9.4.0
build_alias = build_alias =
build_cpu = i386 build_cpu = i386
build_os = darwin9.3.0 build_os = darwin9.4.0
build_vendor = apple build_vendor = apple
datadir = ${datarootdir} datadir = ${datarootdir}
datarootdir = ${prefix}/share datarootdir = ${prefix}/share
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
dvidir = ${docdir} dvidir = ${docdir}
exec_prefix = ${prefix} exec_prefix = ${prefix}
host = i386-apple-darwin9.3.0 host = i386-apple-darwin9.4.0
host_alias = host_alias =
host_cpu = i386 host_cpu = i386
host_os = darwin9.3.0 host_os = darwin9.4.0
host_vendor = apple host_vendor = apple
htmldir = ${docdir} htmldir = ${docdir}
includedir = ${prefix}/include includedir = ${prefix}/include

View File

@ -907,10 +907,9 @@ static void pgq_queue_run(char *dir,
info(0, "pgsql_queue: Queue runner on [%s] shutdown, started...", dir); info(0, "pgsql_queue: Queue runner on [%s] shutdown, started...", dir);
gwlist_remove_producer(items_list); gwlist_remove_producer(items_list);
#if 0
for (i=0;i<num_threads; i++) for (i=0;i<num_threads; i++)
gwthread_cancel(th_ids[i]); gwthread_cancel(th_ids[i]);
#endif
for (i=0;i<num_threads; i++) for (i=0;i<num_threads; i++)
gwthread_join(th_ids[i]); gwthread_join(th_ids[i]);

View File

@ -1148,7 +1148,7 @@ static int make_and_queue_msg(Octstr *data, Octstr *ctype, List *reply_headers,
octstr_get_cstr(qdir), octstr_get_cstr(qdir),
"MMSBox", "MMSBox",
octstr_imm(MM_NAME)); octstr_imm(MM_NAME));
info(0, "MMSBox: Queued message from service [%s], [transid [%s]: %s", info(2, "MMSBox: Queued message from service [%s], [transid [%s]: %s",
octstr_get_cstr(svc_name), octstr_get_cstr(svc_name),
otransid ? octstr_get_cstr(otransid) : "", otransid ? octstr_get_cstr(otransid) : "",
octstr_get_cstr(x)); octstr_get_cstr(x));

View File

@ -587,11 +587,7 @@ void mmsbox_cleanup_settings(void)
} }
void free_mmsbox_http_clientInfo(MmsBoxHTTPClientInfo *h, int freeh) void free_mmsbox_http_clientInfo(MmsBoxHTTPClientInfo *h, int freeh)
{ {
debug("free info", 0,
" entered free_clientinfo %d, ip=[%ld]", freeh, (long)h->ip);
octstr_destroy(h->ip); octstr_destroy(h->ip);
octstr_destroy(h->url); octstr_destroy(h->url);
octstr_destroy(h->ua); octstr_destroy(h->ua);
@ -599,7 +595,5 @@ void free_mmsbox_http_clientInfo(MmsBoxHTTPClientInfo *h, int freeh)
http_destroy_cgiargs(h->cgivars); http_destroy_cgiargs(h->cgivars);
http_destroy_headers(h->headers); http_destroy_headers(h->headers);
if (freeh) gw_free(h); if (freeh) gw_free(h);
debug("free info", 0, " left free_clientinfo");
} }

View File

@ -500,7 +500,7 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
char *notify_cmd = NULL, tbuf[64]; char *notify_cmd = NULL, tbuf[64];
int msize = h->body ? octstr_len(h->body) : 0; int msize = h->body ? octstr_len(h->body) : 0;
List *qh = http_create_empty_headers(); List *qh = http_create_empty_headers();
char *xmtype;
debug("proxy.sendinterface", 0, debug("proxy.sendinterface", 0,
" --> Enterred sendmms interface, blen=%d <--- ", " --> Enterred sendmms interface, blen=%d <--- ",
@ -512,8 +512,10 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
if (!h->body) { /* A body is required. */ if (!h->body) { /* A body is required. */
http_header_add(rh, "Content-Type", "text/plain"); http_header_add(rh, "Content-Type", "text/plain");
hstatus = HTTP_BAD_REQUEST; 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; goto done;
} }
@ -1482,7 +1484,9 @@ static void sendmms_proxy(MmsHTTPClientInfo *h)
http_header_add(rh, "Content-Type", "text/plain"); http_header_add(rh, "Content-Type", "text/plain");
ctype_set = 1; ctype_set = 1;
hstatus = HTTP_FORBIDDEN; 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; break;
} }