gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-32


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-328-gb17203e
Date: Mon, 05 Dec 2011 13:35:10 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  b17203eab97c60d3782c736f9ac9a10b67be5136 (commit)
      from  7da17ffcb63989ebacd50fcb847f1068686d2cad (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=b17203eab97c60d3782c736f9ac9a10b67be5136


commit b17203eab97c60d3782c736f9ac9a10b67be5136
Author: Daniele Forsi <address@hidden>
Date:   Mon Dec 5 14:26:47 2011 +0100

    When decoding a PDU SMS autodetect if it contains the SMSC
    
    First try with GN_SMS_PDU_DEFAULT as before, if it fails retry with
    GN_SMS_PDU_NOSMSC.
    Tested with a Nokia Premicell ("Nokia Cellular Data Adapter for GSM and
    PCN/DCS 1800" and with the fake driver.
    http://lists.nongnu.org/archive/html/gnokii-users/2011-12/msg00022.html

diff --git a/ChangeLog b/ChangeLog
index 1d71836..6d5361c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@
  * libgnokii updates
     o replace gethostbyname (deprecated) with getaddrinfo in tcp
       driver                                            (Paweł Kot)
+ * at driver updates
+    o in the default case autodetect if PDU SMS starts with SMSC
+                                                    (Daniele Forsi)
+ * fake driver updates
+    o always autodetect if PDU SMS starts with SMSC (Daniele Forsi)
 
 0.6.31
 ======
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index 90bfbe3..77affb4 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -2423,7 +2423,7 @@ static gn_error ReplyGetSMS(int messagetype, unsigned 
char *buffer, int length,
 {
        at_line_buffer buf;
        gn_error ret = GN_ERR_NONE;
-       unsigned int sms_len, pdu_flags;
+       unsigned int sms_len;
        unsigned char *tmp;
        gn_error error;
        at_driver_instance *drvinst = AT_DRVINST(state);
@@ -2508,11 +2508,12 @@ static gn_error ReplyGetSMS(int messagetype, unsigned 
char *buffer, int length,
        hex2bin(tmp, buf.line3, sms_len);
 
        if (drvinst->no_smsc) {
-               pdu_flags = GN_SMS_PDU_NOSMSC;
+               ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, 
GN_SMS_PDU_NOSMSC);
        } else {
-               pdu_flags = GN_SMS_PDU_DEFAULT;
+               ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, 
GN_SMS_PDU_DEFAULT);
+               if (ret == GN_ERR_INTERNALERROR)
+                       ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, 
GN_SMS_PDU_NOSMSC);
        }
-       ret = gn_sms_pdu2raw(data->raw_sms, tmp, sms_len, pdu_flags);
 
        free(tmp);
        return ret;
diff --git a/common/phones/fake.c b/common/phones/fake.c
index 436492d..fb246f7 100644
--- a/common/phones/fake.c
+++ b/common/phones/fake.c
@@ -167,6 +167,8 @@ static gn_error at_sms_get_generic(gn_data *data, struct 
gn_statemachine *state,
 
        hex2bin(tmp, sms, len);
        e = gn_sms_pdu2raw(data->raw_sms, tmp, len, GN_SMS_PDU_DEFAULT);
+       if (e == GN_ERR_INTERNALERROR)
+               e = gn_sms_pdu2raw(data->raw_sms, tmp, len, GN_SMS_PDU_NOSMSC);
        free(tmp);
        return e;
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |    5 +++++
 common/phones/atgen.c |    9 +++++----
 common/phones/fake.c  |    2 ++
 3 files changed, 12 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]