From bug:
http://bugs.kannel.org/view_bug_advanced_page.php?f_id=0000341

Problem:
Whenever there is submit_sm_resp failure, the submit_sm is going on
endlessly, instead of N retries.

Explanation:
The problem exists because variable++ increments variable by one but
returns always variable without the increment. so the line:
sms->sms.resend_try = (sms->sms.resend_try > 0 ? sms->sms.resend_try++ : 1);
is always setting sms->sms.resend_try to 1 or to sms->sms.resend_try

Solution:
With value+1instead the problem is fixed.

Already tested and it's working.

Attaching the PATCH.

Regards,
Martín Conte
--- bb_smscconn.c.orig  2006-05-09 12:58:43.000000000 -0600
+++ bb_smscconn.c       2006-05-09 13:00:12.000000000 -0600
@@ -288,7 +288,7 @@
                                        octstr_create("Retries Exceeded"));
                break;
            }
-           sms->sms.resend_try = (sms->sms.resend_try > 0 ? sms->sms.resend_try++ : 1);
+           sms->sms.resend_try = (sms->sms.resend_try > 0) ? sms->sms.resend_try+1 : 1;
            time(&sms->sms.resend_time);
        }
        gwlist_produce(outgoing_sms, sms);

Reply via email to