[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-30
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-309-g09d4923 |
Date: |
Sun, 20 Nov 2011 16:22:07 +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 09d4923fe5dc1341070e8420b092202ed9c71eb9 (commit)
from 276950f56cf35392da75133bccb5901e3b2d66a2 (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=09d4923fe5dc1341070e8420b092202ed9c71eb9
commit 09d4923fe5dc1341070e8420b092202ed9c71eb9
Author: Daniele Forsi <address@hidden>
Date: Sun Nov 20 14:58:07 2011 +0100
Return GN_ERR_INVALIDLOCATION only if requested location is out of bounds
Hide the difference between those phones returning an error for empty
locations and those returning "OK" so that applications will consistently
get GN_ERR_EMPTYLOCATION for locations that exist but are currently empty
and GN_ERR_INVALIDLOCATION for locations that don't exist.
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index 164015b..36f086d 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -1828,8 +1828,22 @@ static gn_error ReplyReadPhonebook(int messagetype,
unsigned char *buffer, int l
char *pos;
gn_error error;
- if ((error = at_error_get(buffer, state)) != GN_ERR_NONE)
- return (error == GN_ERR_UNKNOWN) ? GN_ERR_INVALIDLOCATION :
error;
+ error = at_error_get(buffer, state);
+ switch (error) {
+ case GN_ERR_NONE:
+ break;
+ case GN_ERR_FAILED:
+ /* Some phones return "+CME ERROR: 3" for invalid locations */
+ /* Fall through */
+ case GN_ERR_UNKNOWN:
+ /* Some phones return "+CME ERROR: 100" instead of "OK" for
empty locations */
+ if (data->phonebook_entry->location >= drvinst->memoryoffset &&
data->phonebook_entry->location < drvinst->memoryoffset + drvinst->memorysize) {
+ return GN_ERR_EMPTYLOCATION;
+ }
+ return GN_ERR_INVALIDLOCATION;
+ default:
+ return error;
+ }
buf.line1 = buffer + 1;
buf.length = length;
-----------------------------------------------------------------------
Summary of changes:
common/phones/atgen.c | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-309-g09d4923,
Daniele Forsi <=