Re: sms-resend-retry, sms-resend-freq and splitted messages

Michael Zervakis <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello,

Any comments regarding this patch? The case is that when we send a multi 
part MT with SMPP for example and submit_sm_resp contains an error code, 
Kannel will not honor sms-resend-retry and sms-resend-freq parameters 
and will retry submit_sm immediately until successful (I noticed multi 
part MTs staying in queue for a day or more).

BR,

Mike Zervakis
 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Michael Zervakis
Sent: Wednesday, February 18, 2009 1:10 AM
To: [email protected]
Subject: Re: sms-resend-retry, sms-resend-freq and splitted messages

Michael Zervakis wrote:
 > Hello,
 > 
 > It seems that sms-resend-retry and sms-resend-freq parameters don't
 > apply when we deal with splitted MT. I noticed that splitted MT stay
 > in queue for ever when getting errors like 0x14 message queue full. Is
 > this the expected behavior?
 > 
 > BR,
 > 
 > Mike
 >
bb_smscconn.c.patch (text/plain, 921 B)
? bb_smscconn.c.patch
Index: gw/bb_smscconn.c
===================================================================
RCS file: /home/cvs/gateway/gw/bb_smscconn.c,v
retrieving revision 1.100
diff -u -r1.100 bb_smscconn.c
--- gw/bb_smscconn.c    14 Jan 2009 11:11:46 -0000      1.100
+++ gw/bb_smscconn.c    17 Feb 2009 23:08:24 -0000
@@ -290,6 +290,13 @@
 void bb_smscconn_send_failed(SMSCConn *conn, Msg *sms, int reason, Octstr *reply)
 {
     if (sms->sms.split_parts != NULL) {
+        if (reason == SMSCCONN_FAILED_TEMPORARILY) {
+            if (sms_resend_retry >= 0 && sms->sms.resend_try >= sms_resend_retry) {
+                reason = SMSCCONN_FAILED_DISCARDED;
+            }
+            sms->sms.resend_try = (sms->sms.resend_try > 0 ? sms->sms.resend_try + 1 : 1);
+            time(&sms->sms.resend_time);
+        }
         handle_split(conn, sms, reason);
         octstr_destroy(reply);
         return;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.