gnokii-users
[Top][All Lists]
Advanced

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

Re: Ok I am stupid


From: Pawel Kot
Subject: Re: Ok I am stupid
Date: Mon, 12 Aug 2002 00:30:18 +0200 (CEST)

On Mon, 12 Aug 2002, Pawel Kot wrote:

> On 11 Aug 2002, Konstantinos Agouros wrote:
>
> > >Please create a snapshot and put it on somewhere on the net. We can help 
> > >you
> > >better if we can see the whole code.
> > I will do that tomorrow. To what I narrowed it down is:
> > Already in SM_Functions the PhonebookEntry in GSM_Data is corrupted (i added
> > a printf to a cvs checkout from this morning). If I do this from a plain 
> > c-pro-
> > gram it works.
>
> Yes, I can see this corruption also in xgnokii as Ulrich reported. I'm
> trying to trace the reason....
> [...]
> OK. The problem was introduced *after* 0.4.3. I suspect the following:
>  * xgnokii updates:
>     o remove unnecessary GSM_Data declarations         (Markus Plail)
> Markus, could you elaborate on these changes? And maybe point the patch?

OK. Fixed. The driver was writing some data the the some random pointer
which was under data->Bitmap. Well, not fixed, but workarounded.

The problem is with ugly gdat usage in xgnokii_lowlevel.c. It is declared
as global static. It is nulled in the initializing function which is
correct. But later in (almost) each function we do:
void some_function(something)
{
        GSM_SomeField_in_GSM_Data something;

        gdat.something = &something;
        [...]
        return;
}
After leaving this function the pointer is bogus. Quick fix would be to
null GSM_Data pointers before quitting the function. The correct fix
should start with the removal of the global gdat.

Konstantinos, Ulrich, could you please test CVS?

pkot
PS. Why is GSM_Bitmap used with phonebook? Markus?
-- 
mailto:address@hidden :: mailto:address@hidden
http://kt.linuxnews.pl/ :: Kernel Traffic po polsku





reply via email to

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