gnokii-users
[Top][All Lists]
Advanced

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

Re: Patch 3


From: Pawel Kot
Subject: Re: Patch 3
Date: Wed, 03 Apr 2002 13:47:02 +0200

Hi,

>>> address@hidden 3 April 2002 12:58:29 >>>
> On Wed, Apr 03, 2002 at 11:07:31AM +0200, Pawel Kot wrote:
> > And I'd like to point one important thing. We use identify function too 
> > much.
> > Two examples. The first example: when you do gnokii --identify identify()
> > function is called twice. The second example: running gnokii identify() is
> > called every time some functionality is used. We need to get rid of it and
> > use identify() only *once* for the user application run. We need to check
> > some global values (representing model etc) in identify(). Anyone to do it?
> > Thanks to Igor Popik for pointing me it out and saying that it's dumb ;-)
> 
> Yes, I know about it. But I don't want to introduce another global variables
> in the phone drivers. It won't help the multiple phone support in the future
> :-)  The better solution is to extend the GSM_Statemachine (or GSM_Phone -
> it isn't important) to include phone _instance_ and model specific data.
> We can store this info there. But the major problem is that the incoming
> functions cannot get the state structure. We should modify _all_ of the
> incoming function to get GSM_Statemachine *state as an argument.

Why would you want it in the incoming functions (I mean in this case).
You should check for it *before* you send the request to the phone. And
you don't need to set these fields in the incoming functions. It is enough
that you set GSM_Data and then in come other place maybe in the caller
from the driver (I mean NXXXX_Identify() or something) you can set the
fields in GSM_Statemachine. I think it would be clean and wouldn't require
too much changes. Any objections?

pkot




reply via email to

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