gnokii-users
[Top][All Lists]
Advanced

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

Re: --writephonebook, --deletephonebook


From: Pawel Kot
Subject: Re: --writephonebook, --deletephonebook
Date: Wed, 11 Aug 2004 10:34:38 +0200 (CEST)

On Wed, 11 Aug 2004, Reiner Steib wrote:

> A cosmetic issue:
>
> ,----
> | $ gnokii --deletephonebook SM 1 end
> | [...]
> | Phonebook entry removed: memory type: SIM card, loc: 125
> | Phonebook entry removal FAILED (The given memory location is invalid.):\
> |  memory type: SIM card, loc: 126
> `----
>
> For "1 end" it is not a failure that location 126 fails, but the
> expected behavior.

At first sight I thought we need more logic in deletephonebook(). But is
seems it will be easy fixable. Try the following patch:

--- gnokii/gnokii.c~    2004-08-11 09:51:00.000000000 +0200
+++ gnokii/gnokii.c     2004-08-11 09:51:00.000000000 +0200
@@ -3581,10 +3581,11 @@
                                 gn_memory_type2str(entry.memory_type), 
entry.location);
                        break;
                default:
-                       fprintf (stderr, _("Phonebook entry removal FAILED 
(%s): memory type: %s, loc: %d\n"),
-                                gn_error_print(error), 
gn_memory_type2str(entry.memory_type), entry.location);
                        if (last_location == INT_MAX)
                                last_location = 0;
+                       else
+                               fprintf (stderr, _("Phonebook entry removal 
FAILED (%s): memory type: %s, loc: %d\n"),
+                                        gn_error_print(error), 
gn_memory_type2str(entry.memory_type), entry.location);
                        break;
                }
        }

pkot
-- 
mailto:address@hidden
http://www.gnokii.org/




reply via email to

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