[PATCH] another issue with recently added SMPP patches

"Oded Arbel" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hi list.

when using relation_UTC_time in sprintf, remember that it's an Octstr
and not a char buffer.

here's a patch to remedy the situation.


--
Oded Arbel
m-Wise Inc.
[email protected]
(972)-67-340014
(972)-9-9581711 (ext: 116)

::..
An unbreakable toy is useful for breaking other toys.
smpp.patch (application/octet-stream, 987 B)
--- kannel-dev/gateway/gw/smsc_smpp.c	2002-05-22 11:40:16.000000000 +0300
+++ gateway/gw/smsc_smpp.c	2002-05-23 10:56:20.000000000 +0300
@@ -334,7 +334,7 @@
             sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
                     tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
                     tm.tm_hour, tm.tm_min, tm.tm_sec,
-                    0, gwqdiff, relation_UTC_time );
+                    0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
             pdu->u.submit_sm.validity_period = octstr_create(buffer);
         }
 
@@ -343,7 +343,7 @@
             sprintf(buffer, "%02d%02d%02d%02d%02d%02d0%01d%02d%1s",
                     tm.tm_year % 100, tm.tm_mon + 1, tm.tm_mday,
                     tm.tm_hour, tm.tm_min, tm.tm_sec,
-                    0, gwqdiff, relation_UTC_time );
+                    0, gwqdiff, octstr_get_cstr(relation_UTC_time) );
             pdu->u.submit_sm.schedule_delivery_time = octstr_create(buffer);
         }
     }
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.