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-61


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-61-g8509de9
Date: Sun, 26 Sep 2010 22:26:06 +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  8509de915c5f5956204a20e01142b291cbe8412e (commit)
      from  a01e678c8068743e757ab7811e5cec42b9c0bb63 (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=8509de915c5f5956204a20e01142b291cbe8412e


commit 8509de915c5f5956204a20e01142b291cbe8412e
Author: Daniele Forsi <address@hidden>
Date:   Mon Sep 27 00:24:41 2010 +0200

    Make GetSMSStatus fail only if both commands failed
    
    Some phones or data cards only support one memory type (ME or SM)
    and return ERROR for the other.

diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index c95ca6e..cf23e61 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -1380,25 +1380,25 @@ static gn_error AT_GetSMSStatus(gn_data *data, struct 
gn_statemachine *state)
 {
        gn_sms_status smsstatus = {0, 0, 0, 0, GN_MT_XX}, *save_smsstatus;
        gn_memory_status memory_status = {GN_MT_ME, 0, 0}, *save_memory_status;
-       gn_error ret = GN_ERR_NONE;
+       gn_error ret_me, ret_sm;
 
        save_smsstatus = data->sms_status;
        data->sms_status = &smsstatus;
        save_memory_status = data->memory_status;
        data->memory_status = &memory_status;
-       ret = AT_GetSMSStatusInternal(data, state);
-       if (ret != GN_ERR_NONE)
-               goto out;
-       save_smsstatus->number = smsstatus.number;
+       ret_me = AT_GetSMSStatusInternal(data, state);
+       if (ret_me == GN_ERR_NONE)
+               save_smsstatus->number = smsstatus.number;
        data->memory_status->memory_type = GN_MT_SM;
-       ret = AT_GetSMSStatusInternal(data, state);
-       if (ret != GN_ERR_NONE)
-               goto out;
-       save_smsstatus->number += smsstatus.number;
-out:
+       ret_sm = AT_GetSMSStatusInternal(data, state);
+       if (ret_sm == GN_ERR_NONE)
+               save_smsstatus->number += smsstatus.number;
        data->memory_status = save_memory_status;
        data->sms_status = save_smsstatus;
-       return ret;
+       /* Don't fail if phone (or data card) supports at least one memory type 
*/
+       if ((ret_me != GN_ERR_NONE) && (ret_sm != GN_ERR_NONE))
+               return ret_me;
+       return GN_ERR_NONE;
 }
 
 static gn_error AT_SendSMS(gn_data *data, struct gn_statemachine *state)

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

Summary of changes:
 common/phones/atgen.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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