From 068ebd9a9c2d3b62189e212072f4985428eaea03 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Tue, 25 Oct 2005 09:53:13 +0000 Subject: [PATCH] Adding .cvsignore files Small bug fix to mmsmobilesender (if recipient does not support mms and no message set, do not send it) --- mbuni/.cvsignore | 18 +++++++++++++++ mbuni/autotools/.cvsignore | 19 ++++++++++++++++ mbuni/doc/.cvsignore | 10 +++++++++ mbuni/doc/examples/.cvsignore | 10 +++++++++ mbuni/doc/images/.cvsignore | 10 +++++++++ mbuni/misc-patches/.cvsignore | 10 +++++++++ mbuni/mmsbox/.cvsignore | 11 +++++++++ mbuni/mmsc/.cvsignore | 14 ++++++++++++ mbuni/mmsc/mmsmobilesender.c | 42 +++++++++++++++++------------------ 9 files changed, 122 insertions(+), 22 deletions(-) create mode 100644 mbuni/.cvsignore create mode 100644 mbuni/autotools/.cvsignore create mode 100644 mbuni/doc/.cvsignore create mode 100644 mbuni/doc/examples/.cvsignore create mode 100644 mbuni/doc/images/.cvsignore create mode 100644 mbuni/misc-patches/.cvsignore create mode 100644 mbuni/mmsbox/.cvsignore create mode 100644 mbuni/mmsc/.cvsignore diff --git a/mbuni/.cvsignore b/mbuni/.cvsignore new file mode 100644 index 0000000..0fb1263 --- /dev/null +++ b/mbuni/.cvsignore @@ -0,0 +1,18 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +mpeg2dec-*.tar.gz +Makefile +Makefile.in +configure +.deps +.libs +aclocal.m4 +config.log +config.cache +libtool +config.status +gmon.out diff --git a/mbuni/autotools/.cvsignore b/mbuni/autotools/.cvsignore new file mode 100644 index 0000000..e0c61fb --- /dev/null +++ b/mbuni/autotools/.cvsignore @@ -0,0 +1,19 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs +config.guess +config.sub +depcomp +install-sh +ltconfig +ltmain.sh +missing +mkinstalldirs +compile diff --git a/mbuni/doc/.cvsignore b/mbuni/doc/.cvsignore new file mode 100644 index 0000000..759d12b --- /dev/null +++ b/mbuni/doc/.cvsignore @@ -0,0 +1,10 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs diff --git a/mbuni/doc/examples/.cvsignore b/mbuni/doc/examples/.cvsignore new file mode 100644 index 0000000..759d12b --- /dev/null +++ b/mbuni/doc/examples/.cvsignore @@ -0,0 +1,10 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs diff --git a/mbuni/doc/images/.cvsignore b/mbuni/doc/images/.cvsignore new file mode 100644 index 0000000..759d12b --- /dev/null +++ b/mbuni/doc/images/.cvsignore @@ -0,0 +1,10 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs diff --git a/mbuni/misc-patches/.cvsignore b/mbuni/misc-patches/.cvsignore new file mode 100644 index 0000000..759d12b --- /dev/null +++ b/mbuni/misc-patches/.cvsignore @@ -0,0 +1,10 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs diff --git a/mbuni/mmsbox/.cvsignore b/mbuni/mmsbox/.cvsignore new file mode 100644 index 0000000..003d1e9 --- /dev/null +++ b/mbuni/mmsbox/.cvsignore @@ -0,0 +1,11 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs +mmsbox diff --git a/mbuni/mmsc/.cvsignore b/mbuni/mmsc/.cvsignore new file mode 100644 index 0000000..b34f6d5 --- /dev/null +++ b/mbuni/mmsc/.cvsignore @@ -0,0 +1,14 @@ +.*.sw[po] +*~ +*.diff +*.patch +*.lo +*.o +Makefile +Makefile.in +.deps +.libs +mmsrelay +mmsproxy +mmsfromemail +mmssend diff --git a/mbuni/mmsc/mmsmobilesender.c b/mbuni/mmsc/mmsmobilesender.c index 961ae4b..597beff 100644 --- a/mbuni/mmsc/mmsmobilesender.c +++ b/mbuni/mmsc/mmsmobilesender.c @@ -320,32 +320,30 @@ static int sendNotify(MmsEnvelope *e) if (mms_queue_update(e) == 1) e = NULL; /* Queue entry gone. */ else - mms_queue_free_env(e); - + mms_queue_free_env(e); goto done; } else if (send_ind == 0) { /* provisioned but does not support */ Octstr *s = octstr_format(octstr_get_cstr(settings->mms_notify_txt), from); - List *pheaders; - Octstr *sto = octstr_duplicate(phonenum); - - octstr_url_encode(s); - octstr_url_encode(sto); - - url = octstr_format("%S&text=%S&to=%S",settings->sendsms_url,s, sto); - pheaders = http_create_empty_headers(); - http_header_add(pheaders, "Connection", "close"); - http_header_add(pheaders, "User-Agent", MM_NAME "/" GW_VERSION); - - http_start_request(httpcaller, HTTP_METHOD_GET, url, - pheaders, NULL, 0, &edummy, NULL); - - - http_destroy_headers(pheaders); - octstr_destroy(url); - octstr_destroy(s); - octstr_destroy(sto); - + if (s && octstr_len(s) > 0) { /* Only send if the string was set. */ + List *pheaders; + Octstr *sto = octstr_duplicate(phonenum); + + octstr_url_encode(s); + octstr_url_encode(sto); + + url = octstr_format("%S&text=%S&to=%S",settings->sendsms_url,s, sto); + pheaders = http_create_empty_headers(); + http_header_add(pheaders, "Connection", "close"); + http_header_add(pheaders, "User-Agent", MM_NAME "/" VERSION); + + http_start_request(httpcaller, HTTP_METHOD_GET, url, + pheaders, NULL, 0, &edummy, NULL); + http_destroy_headers(pheaders); + octstr_destroy(url); + octstr_destroy(sto); + } else if (s) + octstr_destroy(s); res = MMS_SEND_OK; err = octstr_imm("No MMS Ind support, sent SMS instead");