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

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

I think this patch will solve this issue

BR,

Mike Zervakis
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.