gnokii-users
[Top][All Lists]
Advanced

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

Re: Ok I am stupid


From: Konstantinos Agouros
Subject: Re: Ok I am stupid
Date: 11 Aug 2002 12:06:59 GMT
User-agent: nn/6.6.4

In <address@hidden> address@hidden (Konstantinos Agouros) writes:

>In <address@hidden> address@hidden (Konstantinos Agouros) writes:

>>In <address@hidden> address@hidden (Markus Plail) writes:

>>>Hi Konstantinos!

>>>* Konstantinos Agouros writes:
>>>> Hi,

>>>> I had a version mixup and an old libgnokii in another directory (for
>>>> the perl- module). However I still don't get Dates for SMSs and Names
>>>> for the Phonebook.

>>>Can you try the latest CVS. I recently fixed the no name problem. The
>>>problem actually was that if bitmap->Name was not NULL only the bitmap
>>>name got set and not the Phonebook one.
>>I will try that \:)
>Hmmm it seems perl is messing me up somehow:

>I did the following: 

>I took together the code from my Initialize-Routine and my ReadPhonebook-
>Routine and it works.
>If I use it from the perl-module at the moment I get nothing from the
>phonebook. Interestingly enough the location-field always points to 5 after
>I called Gop_ReadPhonebook.

>It would be so much easier if one could use GDB in writing XS-Modules...
Hmmm I enabled debugging and I understand part of what goes wrong:

I set location to 2 before the GOP_ReadPhonebook. The gnokii-internal
debugging tells me:
Reading phonebook location (0)
Message sent: 0x03 / 0x0012
00 01 00 07 01 01 00 01 02 05 00 00 00 00 00 00 |                 
The last byte I think is the number of the entry. What I really do not
understand is how this is 0. The code leading to this is:

           GSM_DataClear(&data);
           entry = (GSM_PhonebookEntry *) calloc (1, 
sizeof(GSM_PhonebookEntry));
           entry->MemoryType = StrToMemoryType(memorytype);
           for(i = start; i <= end; i++)
           {
             result = newHV();
             //memset(entry->Name, ' ', GSM_MAX_PHONEBOOK_NAME_LENGTH + 1);
             //memset(entry->Number, ' ', GSM_MAX_PHONEBOOK_NUMBER_LENGTH + 1);
             fprintf(stderr, "Reading Entry %d\n", i);
             entry->Location = i;
             data.PhonebookEntry = entry;
             DUMP_PHONEBOOK_ENTRY(data.PhonebookEntry);
             fprintf(stderr, "bef data.... = %d  %d\n", 
data.PhonebookEntry->Location, data.PhonebookEntry->MemoryType);
             error = SM_Functions(GOP_ReadPhonebook, &data, &State);

DUMP_PHONEBOOK_ENTRY is a utility-macro with a few printf's. 
In that I have Location set to 2. If I read it after the call which returns
with invalidlocation (which is ok since it thinks it has 0) I read a 5.
The whole loop works in its own stand-alone-c-program. Is it possible that
somewhere in this routine _() is used, since this is defined from perl and
from gnokii.

Konstantin
-- 
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: address@hidden
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres




reply via email to

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