[Top][All Lists]

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

Re: stupid bug in xgnokii phonebook editor

From: chr[]
Subject: Re: stupid bug in xgnokii phonebook editor
Date: Wed, 29 Feb 2012 03:52:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20120207 Icedove/3.0.11

Pawel Kot <gnokii <at>> writes:
> Hi,
> On Sun, Feb 26, 2012 at 17:55, chr[] <chris <at>> wrote:
>> I've got a Nokia C1 phone, which does support multiple phone numbers 
>> per name entry, that is the PM_EXTPBK flag, isn't it? xgnokii phone
>> book editor shows up correct but editing truncates the list.
> I think it is a feature of current xgnokii: it does not support 
> subentries. Patches to change it are welcome.

Are u sure? I just deleted the mentioned if/else block and it works.
And I just retried that just to make sure.

> I think it is some old code that was introduced in order to support
> correctly EXTPBK when one number was stored only. At least some models
> required to replicate the main number as the subentry. I do not think
> we have cared about multiple subentries at that time.

LoL. That said, it just works by accident?

>> xgnokii/xgnokii_contacts.c line 395 in EditPhonebookEntry()
>> if (phoneMonitor.supported & PM_EXTPBK) {
>> current_entry->entry.subentries[0].number_type = ...
>> current_entry->entry.subentries_count = 1;
> That's plain simple. We're creating a subentry which is equal to the 
> main number.
>> This block doesn't make sense.
> See above. Do not be easy on judgements.

I'm not. I just stopped there with gdb and the current_entry is set up
correctly with a main number and some subentries[subentries_count] and the
code just sets the counter to 1 ... and leaks the memory of the other

>> Delete this block and the phone book works.
> What do you mean by "works" here? How would it keep other subentries?
>> current_entry->entry.number is already set.
> That's not enough as explained above.

I attach a gdb session file, where I just created in xgnokii a test entry
with 3 sub-numbers. They got stored correctly in my phone (after applying
my 'patch').

> take care,

Well, after some playing with the subentry types I noticed xgnoki doesn't
report about transfer errors except on stderr: e.g. A note may contain
chars and numbers not. But that's it ...


Attachment: xgnoki-gdb.txt
Description: Text document

reply via email to

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