Looks good. In fact it updates the split case with the same code used for non-split. Therefore safe. +1

BR,
Nikos
----- Original Message ----- From: "Michael Zervakis" <mich...@zervakis.com>
To: <devel@kannel.org>
Sent: Tuesday, February 24, 2009 8:59 PM
Subject: Re: sms-resend-retry, sms-resend-freq and splitted messages


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: devel-boun...@kannel.org [mailto:devel-boun...@kannel.org] On
Behalf Of Michael Zervakis
Sent: Wednesday, February 18, 2009 1:10 AM
To: devel@kannel.org
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
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;



Reply via email to