gnokii-users
[Top][All Lists]
Advanced

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

Re: stupid bug in xgnokii phonebook editor


From: Pawel Kot
Subject: Re: stupid bug in xgnokii phonebook editor
Date: Wed, 29 Feb 2012 10:23:37 +0100

Hi,

On Wed, Feb 29, 2012 at 03:52, chr[] <address@hidden> wrote:
> Pawel Kot <gnokii <at> gmail.com> writes:
>>
>> Hi,
>>
>> On Sun, Feb 26, 2012 at 17:55, chr[] <chris <at> rudorff.com> 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'm not sure. What do you mean by "it works"? Can you please describe
the use case with the details?

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

Sorry, do not get your point. What does work 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
> entries?!

I agree the code looks wrong. I think now additional condition with
(current_entry->entry.subentries_count == 0) should be added in if.

>>
>>> 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').

What if you have just one number?

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

You mean debug log or additional error information without debug log?

take care,
PaweĊ‚



reply via email to

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