shared.c - splitted parts of long sms with same id

"Robert Galach" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
hi again,

I think there is one more bug, I found in current kannel cvs version.

If long sms message is splitted (gw/shared.c:sms_split) every part created
has the same id field,
which is used to ACK/NACK comunication. It implies that acking first part by
smsc,
removes any other parts with that id from storefile and warnings at next
acks.

Patch attached.

Regards
Robert GaÂłach
shared_split_sms_different_id.patch (application/octet-stream, 666 B)
Index: gw/shared.c
===================================================================
RCS file: /home/cvs/gateway/gw/shared.c,v
retrieving revision 1.33
diff -u -r1.33 shared.c
--- gw/shared.c 16 Feb 2004 19:41:26 -0000      1.33
+++ gw/shared.c 10 Mar 2004 10:56:51 -0000
@@ -487,6 +487,9 @@
             part->sms.msgdata =
                 extract_msgdata_part_by_coding(temp, split_chars,
                                                max_part_len - nlsuf_len);
+            /* create new id for every part, except last */
+            uuid_clear(part->sms.id);
+            uuid_generate(part->sms.id);
             last = 0;
         }
         if (header)
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.