This adds support to CIMD2 for correctly setting the More Messages to 
Send flag. This is supposed to make delivery of messages to the same 
destination faster.

For other protocols that set this flag, it should be easy to add 
support.

Please vote and include if ok.
-- 
Med vennlig hilsen,
Eurobate ASA

Arne K. Haaje
Senior Network Engineer
--------------------------------------------------------------------
    Eurobate ASA - Postboks 4589 Nydalen - 0404 Oslo - Norway
Phone: +47 23 22 73 73 - Fax: +47 23 22 73 74 - Mob: +47 92 88 44 66
                    http://www.eurobate.no/
diff -ru /tmp/kannel-snapshot/gw/msg-decl.h gw/msg-decl.h
--- /tmp/kannel-snapshot/gw/msg-decl.h	2004-01-22 15:08:24.000000000 +0100
+++ gw/msg-decl.h	2004-06-11 11:06:02.000000000 +0200
@@ -103,6 +103,7 @@
 		OCTSTR(charset);
 		OCTSTR(boxc_id);
 		OCTSTR(binfo);
+		INTEGER(msg_left);
 	})
 
 MSG(ack,
diff -ru /tmp/kannel-snapshot/gw/shared.c gw/shared.c
--- /tmp/kannel-snapshot/gw/shared.c	2004-03-10 13:49:59.000000000 +0100
+++ gw/shared.c	2004-06-11 13:01:46.000000000 +0200
@@ -364,6 +364,11 @@
     octstr_format_append(sms->sms.udhdata, "%c\3%c%c%c", 
     	    	    	 0, msg_sequence, num_messages, part_no);
 
+     /* Set the number of messages left, if any */
+     if (part_no < num_messages)
+     	sms->sms.msg_left = num_messages - part_no;
+     else
+     	sms->sms.msg_left = 0;
     /* 
      * Now that we added the concatenation information the
      * length is all wrong. we need to recalculate it. 
diff -ru /tmp/kannel-snapshot/gw/smsc/smsc_cimd2.c gw/smsc/smsc_cimd2.c
--- /tmp/kannel-snapshot/gw/smsc/smsc_cimd2.c	2004-06-10 14:56:38.000000000 +0200
+++ gw/smsc/smsc_cimd2.c	2004-06-11 13:40:08.000000000 +0200
@@ -1447,6 +1447,15 @@
     if (msg->sms.pid > 0)
         packet_add_int_parm(packet, P_PROTOCOL_IDENTIFIER, msg->sms.pid, conn);
  
+	/* If there are more messages to the same destination, then set the
+	* More Messages to Send flag. This allow faster delivery of many messages 
+	* to the same destination
+	*/
+    if (msg->sms.msg_left > 0)
+        packet_add_int_parm(packet, P_MORE_MESSAGES_TO_SEND, 1, conn);
+    else
+        packet_add_int_parm(packet, P_MORE_MESSAGES_TO_SEND, 0, conn);
+	
     truncated = 0;
 
     spaceleft = 140;

Reply via email to