Hi list,

forwarding this patch from Marius Huysamen... even thou I have instructed him to subscribe to the devel list and re-submit.

Can you guys that use our AT modem module a lot have a look on it. Thanks.

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
-------------------------------------------------------------------
--- Begin Message ---
Hi

I've been trying to submit this patch as described in the FAQ, but neither [EMAIL PROTECTED] nor [EMAIL PROTECTED] work. The messages bounce with "unknown username". I've thus tried to send it to [EMAIL PROTECTED]

If I am following the incorrect procedure for submitting this patch, please update your website with the relevant information.

Regards
Marius Huysamen

[EMAIL PROTECTED] wrote:
You are not allowed to post to this mailing list, and your message has
been automatically rejected.  If you think that your messages are
being rejected in error, contact the mailing list owner at
[EMAIL PROTECTED]




------------------------------------------------------------------------

Subject:
Kannel AT smsc CNMA-OK patch
From:
Marius Huysamen <[EMAIL PROTECTED]>
Date:
Fri, 29 Feb 2008 09:22:32 +0200
To:
[email protected]

To:
[email protected]


Hello

The following patch is against the stable version of Kannel 1.4.1, but
I've made these changes against 1.4.0 as well.

The at2_wait_modem_command function would prematurely return when
receiving an OK, which is actually the modems response to that functions
own CNMA acknowledgment.  at2_send_one_message would then go through its
retry cycle, since it is looking for '>' but receiving 'OK's.  After all
the retries have been exhausted, smsc_at would inform the bearerbox that
messages are failing, at which time the bearerbox then instructs sms_at
to reset itself.

This patch consumes an OK for every CNMA that gets sent.

diff -ru gateway-1.4.1-orig/gw/smsc/smsc_at.c
gateway-1.4.1-mhg/gw/smsc/smsc_at.c
--- gateway-1.4.1-orig/gw/smsc/smsc_at.c        2006-05-23
15:27:31.000000000 +0200
+++ gateway-1.4.1-mhg/gw/smsc/smsc_at.c 2008-01-29 14:38:24.000000000 +0200
@@ -622,6 +622,7 @@
     Msg        *msg;
     int len;
     int cmgr_flag = 0;
+    int cnma_ok = 0;

     time(&end_time);
     if (timeout == 0)
@@ -644,8 +645,12 @@
                 goto end;
             }
             if (octstr_search(line, octstr_imm("OK"), 0) != -1) {
-                ret = 0;
-                goto end;
+                if(!cnma_ok) {
+                    ret = 0;
+                    goto end;
+                }
+                else
+                    --cnma_ok;
             }
             if ((gt_flag ) && (octstr_search(line, octstr_imm(">"), 0)
!= -1)) {
                 ret = 1;
@@ -712,8 +717,10 @@
                         }

                         if (!cmgr_flag) {
-                            if (privdata->phase2plus)
+                            if (privdata->phase2plus) {
                                 at2_write_line(privdata, "AT+CNMA");
+                                ++cnma_ok;
+                            }
                         }

                         O_DESTROY(pdu);

Regards
Marius Huysamen

Linux Administrator
Metropolitan Health Group

P.S: I've tried sending this to [EMAIL PROTECTED] but it bounced with username doesn't exist.




--- End Message ---

Reply via email to