Re: [PATCH] empty SMS replaced by default message
Colin Pitrat wrote: Hello, I sent this patch a few days ago, but I've been told that mail with patch attached should be prefixed with [PATCH] so I resend it. The problem is that judging by fields_to_dcs function in sms.c, an empty message with an activating MWI flag should result in discard message MWI whereas a non-empty message should result in store message MWI. But when the smsbox handle the message sent by sendsms HTTP interface, it replace the empty text by a default message. This problem is already highlighted in the comment in the file. Here is the interesting part of the file. /* * Empty message? Two alternatives have to be handled: * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty * if at least a UDH is given. * * XXX this still does not cover the case when the sendsms interface is * used with *no* text and udh. What should we do then?! */ if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else msg-sms.msgdata = octstr_duplicate(reply_emptymessage); } My proposition is to replace the if statement in order to check if the message is a mt_reply (case a) or not. Regards, Colin commited to cvs: 2006-11-17 Stipe Tolj stolj at kannel.org * gw/smsbox.c: allow empty message responses. Thanks to Colin Pitrat [EMAIL PROTECTED] for this patch. [Msg-Id: [EMAIL PROTECTED]] thanks again Colin!!! Stipe --- Kölner Landstrasse 419 40589 Düsseldorf, NRW, Germany tolj.org system architecture Kannel Software Foundation (KSF) http://www.tolj.org/ http://www.kannel.org/ mailto:st_{at}_tolj.org mailto:stolj_{at}_kannel.org ---
Re: [PATCH] empty SMS replaced by default message
Hi, I'm surprised that this patch hasn't been integrated or commented by now. Is there any problem with it ? Colin Pitrat (Bull Services Telco) Bull, Architect of an Open World (TM) Tél : +33 (0) 1 30 80 72 93 www.bull.com Colin Pitrat wrote: Hello, I sent this patch a few days ago, but I've been told that mail with patch attached should be prefixed with [PATCH] so I resend it. The problem is that judging by fields_to_dcs function in sms.c, an empty message with an activating MWI flag should result in discard message MWI whereas a non-empty message should result in store message MWI. But when the smsbox handle the message sent by sendsms HTTP interface, it replace the empty text by a default message. This problem is already highlighted in the comment in the file. Here is the interesting part of the file. /* * Empty message? Two alternatives have to be handled: * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty * if at least a UDH is given. * * XXX this still does not cover the case when the sendsms interface is * used with *no* text and udh. What should we do then?! */ if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else msg-sms.msgdata = octstr_duplicate(reply_emptymessage); } My proposition is to replace the if statement in order to check if the message is a mt_reply (case a) or not. Regards, Colin diff -ur gateway/gw/smsbox.c gateway-new/gw/smsbox.c --- gateway/gw/smsbox.c 2006-07-13 10:05:57.0 +0200 +++ gateway-new/gw/smsbox.c 2006-07-13 10:20:11.0 +0200 @@ -324,12 +324,8 @@ * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty - * if at least a UDH is given. - * - * XXX this still does not cover the case when the sendsms interface is - * used with *no* text and udh. What should we do then?! */ -if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { +if (octstr_len(msg-sms.msgdata) == 0 msg-sms.sms_type == mt_reply) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else begin:vcard fn:Colin Pitrat n:Pitrat;Colin org:Bull;Telco adr:;;rue Jean Jaures;Les Clayes sous Bois;;78340;France email;internet:[EMAIL PROTECTED] tel;work:+33 1 30 80 72 93 x-mozilla-html:FALSE url:http://www.bull.com version:2.1 end:vcard
Re: [PATCH] empty SMS replaced by default message
Hello, there hasn't been any remark on this patch, but it hasn't been committed either. Is there a problem with it ? Regards, Colin Pitrat (Bull Services Telco) Bull, Architect of an Open World (TM) Tél : +33 (0) 1 30 80 72 93 www.bull.com Colin Pitrat wrote: Hello, I sent this patch a few days ago, but I've been told that mail with patch attached should be prefixed with [PATCH] so I resend it. The problem is that judging by fields_to_dcs function in sms.c, an empty message with an activating MWI flag should result in discard message MWI whereas a non-empty message should result in store message MWI. But when the smsbox handle the message sent by sendsms HTTP interface, it replace the empty text by a default message. This problem is already highlighted in the comment in the file. Here is the interesting part of the file. /* * Empty message? Two alternatives have to be handled: * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty * if at least a UDH is given. * * XXX this still does not cover the case when the sendsms interface is * used with *no* text and udh. What should we do then?! */ if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else msg-sms.msgdata = octstr_duplicate(reply_emptymessage); } My proposition is to replace the if statement in order to check if the message is a mt_reply (case a) or not. Regards, Colin diff -ur gateway/gw/smsbox.c gateway-new/gw/smsbox.c --- gateway/gw/smsbox.c 2006-07-13 10:05:57.0 +0200 +++ gateway-new/gw/smsbox.c 2006-07-13 10:20:11.0 +0200 @@ -324,12 +324,8 @@ * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty - * if at least a UDH is given. - * - * XXX this still does not cover the case when the sendsms interface is - * used with *no* text and udh. What should we do then?! */ -if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { +if (octstr_len(msg-sms.msgdata) == 0 msg-sms.sms_type == mt_reply) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else diff -ur gateway/gw/smsbox.c gateway-new/gw/smsbox.c --- gateway/gw/smsbox.c 2006-07-13 10:05:57.0 +0200 +++ gateway-new/gw/smsbox.c 2006-07-13 10:20:11.0 +0200 @@ -324,12 +324,8 @@ * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty - * if at least a UDH is given. - * - * XXX this still does not cover the case when the sendsms interface is - * used with *no* text and udh. What should we do then?! */ -if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { +if (octstr_len(msg-sms.msgdata) == 0 msg-sms.sms_type == mt_reply) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else
Re: [PATCH] empty SMS replaced by default message
Hi, yes it will remove the Empty reply from service provider message when sending blank messages except when this message comes from a sms-service group (mt_reply) with omit-empty set to false. Regards, Colin Hillel wrote: Hi, Will this patch remove the Empty reply from service provider message when sending blank mt messages? This message confuses the client that you are sending a blank message, as there is supposed to be nothing in the message. Thanks
RE:[PATCH] empty SMS replaced by default message
Hi, Will this patch remove the Empty reply from service provider message when sending blank mt messages? This message confuses the client that you are sending a blank message, as there is supposed to be nothing in the message. Thanks
[PATCH] empty SMS replaced by default message
Hello, I sent this patch a few days ago, but I've been told that mail with patch attached should be prefixed with [PATCH] so I resend it. The problem is that judging by fields_to_dcs function in sms.c, an empty message with an activating MWI flag should result in discard message MWI whereas a non-empty message should result in store message MWI. But when the smsbox handle the message sent by sendsms HTTP interface, it replace the empty text by a default message. This problem is already highlighted in the comment in the file. Here is the interesting part of the file. /* * Empty message? Two alternatives have to be handled: * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty * if at least a UDH is given. * * XXX this still does not cover the case when the sendsms interface is * used with *no* text and udh. What should we do then?! */ if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else msg-sms.msgdata = octstr_duplicate(reply_emptymessage); } My proposition is to replace the if statement in order to check if the message is a mt_reply (case a) or not. Regards, Colin diff -ur gateway/gw/smsbox.c gateway-new/gw/smsbox.c --- gateway/gw/smsbox.c 2006-07-13 10:05:57.0 +0200 +++ gateway-new/gw/smsbox.c 2006-07-13 10:20:11.0 +0200 @@ -324,12 +324,8 @@ * a) it's a HTTP sms-service reply: either ignore it or * substitute the empty warning defined * b) it's a sendsms HTTP interface call: leave the message empty - * if at least a UDH is given. - * - * XXX this still does not cover the case when the sendsms interface is - * used with *no* text and udh. What should we do then?! */ -if (octstr_len(msg-sms.msgdata) == 0 octstr_len(msg-sms.udhdata) == 0) { +if (octstr_len(msg-sms.msgdata) == 0 msg-sms.sms_type == mt_reply) { if (trans != NULL urltrans_omit_empty(trans)) return 0; else