SMS-gateway specific protocol update for CIMD2

Sigurður E. Guttormsson <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello!
I needed to make changes for a project we are using Kannel as SMS
Gateway for and enclosed is the diff.  This update is made to enable
send of a truly empty message, used for location updating.  The update
is made from v1.2.1.

Just a quick question, has anyone experienced a problem of duplicated
received messages using CIMD2 gateway?
Best Regards,
SEG
---

kannel/gateway-1.2.1/gw/smsc:$ diff -u smsc_cimd2.c.bak smsc_cimd2.c
--- smsc_cimd2.c.bak	Mon Jan 27 11:43:46 2003
+++ smsc_cimd2.c	Mon Jan 27 13:20:21 2003
@@ -1279,6 +1279,11 @@
         packet_add_hex_parm(packet, P_USER_DATA_HEADER,
msg->sms.udhdata);
         spaceleft -= octstr_len(msg->sms.udhdata);
     }
+	else if (msg->sms.pid == 64)  /* special case, zero-message */
+	{
+        packet_add_hex_parm(packet, P_USER_DATA_HEADER,
msg->sms.udhdata);
+	}
+			
     if (msg->sms.coding == DC_7BIT)
         spaceleft = spaceleft * 8 / 7;
     if (spaceleft < 0)
@@ -1315,6 +1320,9 @@
     if (dcs != 0)
         packet_add_int_parm(packet, P_DATA_CODING_SCHEME, dcs);
 
+    if (msg->sms.pid != 0)
+        packet_add_int_parm(packet, P_PROTOCOL_IDENTIFIER,
msg->sms.pid);
+
     if (truncated > 0) {
         warning(0, "CIMD2: truncating message text to fit "
                 "in %d characters.", spaceleft);


---
Sigurdur E. Guttormsson MSEE - Project Manager
 TrackWell Software - [email protected]
 tel.:  (354) 5100611, mobile: (354) 8600611
 fax.:  (354) 5100601
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.