at2 date bug (stable 1.2.0)

Sindunata Sudarmaji <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <20021023132104.A4594@top4>
Hi All,

I'm running kannel 1.2.0 with Siemens TC35, and I think I've found a bug
in AT2 date handling of received SMS: the month is off by +1.

I don't know if it's fixed at the HEAD CVS, but my current tree does not
have the fix yet.

Please find below my patch against 1.2.0:

--- smsc_at2.c.orig	Tue May 14 06:57:36 2002
+++ smsc_at2.c	Wed Oct 23 13:04:28 2002
@@ -1259,6 +1259,7 @@
     pos++;
     mtime.year += (mtime.year < 70 ? 2000 : 1900);
     mtime.month = swap_nibbles(octstr_get_char(pdu, pos)) ;
+    mtime.month--;
     pos++;
     mtime.day = swap_nibbles(octstr_get_char(pdu, pos));
     pos++;

ps. I'm not subscribed to the list, so please reply to me directly.

regards,
Sindu
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.