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


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-444-ga75482a
Date: Tue, 05 Mar 2013 13:54:14 +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  a75482accb270def62cd0d819faf128165b0ab35 (commit)
      from  2d8c891c034dcfea56ea3284368d40dddf4c04e3 (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=a75482accb270def62cd0d819faf128165b0ab35


commit a75482accb270def62cd0d819faf128165b0ab35
Author: Daniele Forsi <address@hidden>
Date:   Tue Mar 5 14:53:19 2013 +0100

    Implement GN_OP_DeletePhonebook in the fake driver
    
    It is useful for testing xgnokii.

diff --git a/ChangeLog b/ChangeLog
index 9d9b916..c4bb19d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -45,6 +45,7 @@
                                                     (Daniele Forsi)
     o rewrite fake phonebook handling to work also on non C99
       compilers                                     (Daniele Forsi)
+    o implement GN_OP_DeletePhonebook               (Daniele Forsi)
  * documentation updates
     o samples for connect and disconnect scripts for Portech
       devices                                   (Guillermo Benitez)
diff --git a/common/phones/fake.c b/common/phones/fake.c
index 9fc8ac5..9f78efa 100644
--- a/common/phones/fake.c
+++ b/common/phones/fake.c
@@ -507,6 +507,21 @@ static gn_error fake_readphonebook(gn_data *data, struct 
gn_statemachine *state)
        return gn_file_phonebook_raw_parse(pe, fake_phonebook[pe->location - 
1]);
 }
 
+static gn_error fake_deletephonebook(gn_data *data, struct gn_statemachine 
*state)
+{
+       gn_phonebook_entry *pe = data->phonebook_entry;
+
+       if (pe->location < 1 || pe->location > sizeof(fake_phonebook) / 
sizeof(*fake_phonebook))
+               return GN_ERR_INVALIDLOCATION;
+
+       if (pe->memory_type != GN_MT_ME)
+               return GN_ERR_INVALIDMEMORYTYPE;
+
+       fake_phonebook[pe->location - 1] = NULL;
+
+       return GN_ERR_NONE;
+}
+
 static gn_error fake_functions(gn_operation op, gn_data *data, struct 
gn_statemachine *state)
 {
        switch (op) {
@@ -537,6 +552,8 @@ static gn_error fake_functions(gn_operation op, gn_data 
*data, struct gn_statema
                return fake_readphonebook(data, state);
        case GN_OP_WritePhonebook:
                return fake_writephonebook(data, state);
+       case GN_OP_DeletePhonebook:
+               return fake_deletephonebook(data, state);
        default:
                return GN_ERR_NOTIMPLEMENTED;
        }

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

Summary of changes:
 ChangeLog            |    1 +
 common/phones/fake.c |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

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