[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-23

From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-230-g0a9353e
Date: Thu, 26 May 2011 12:25:31 +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  0a9353eeddde66a3eb6ae85938ac6a7ac2b37a6a (commit)
      from  d77ea9cdc6066edb5b34815806574c00671fe1f3 (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 -----------------------------------------------------------------

commit 0a9353eeddde66a3eb6ae85938ac6a7ac2b37a6a
Author: Daniele Forsi <address@hidden>
Date:   Thu May 26 14:20:32 2011 +0200

    Fallback to use gn_phone_model_get() if there is no [flags] section

diff --git a/common/cfgreader.c b/common/cfgreader.c
index b882edd..ab727c6 100644
--- a/common/cfgreader.c
+++ b/common/cfgreader.c
@@ -884,13 +884,14 @@ if (!gnokii_strcmpsep(#f, val, ',')) {\
        dprintf("Flag PM_%s\n", #f);\
-/* Load phone flags (formerly a static array in misc.c) */
+/* Load phone flags from config or fallback to the static array in misc.c */
 gn_phone_model *gn_cfg_get_phone_model(struct gn_cfg_header *cfg, const char 
        struct gn_cfg_header *hdr;
        char *val, *comma, *end, *section = "flags";
        int count;
        static gn_phone_model phone_model = {NULL, NULL, 0};
+       gn_phone_model *found_phone_model;
        static char model[GN_MODEL_MAX_LENGTH] = "";
        if (phone_model.model)
@@ -952,6 +953,10 @@ gn_phone_model *gn_cfg_get_phone_model(struct 
gn_cfg_header *cfg, const char *pr
 #undef SETFLAG
+       found_phone_model = gn_phone_model_get(product_name);
+       if (found_phone_model->model)
+               return found_phone_model;
        /* Give the user some hint on why the product_name wasn't found */
        hdr = cfg_header_get(cfg, (char *)section);
        if (!hdr) {


Summary of changes:
 common/cfgreader.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

libgnokii and core programs

reply via email to

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