gnokii-users
[Top][All Lists]
Advanced

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

3110: prevent use of sm_block_many()


From: Osma Suominen
Subject: 3110: prevent use of sm_block_many()
Date: Thu, 27 Feb 2003 09:41:28 +0200 (EET)

Hi folks,

there's been a relatively long silence on the statemachine issues on the
list. But I found yet another solution for the 3110 that would fix the
problem of multiple message types which was previously "solved" with an
ugly block_many() / sm_block_many() function.

Since the 3110 has its own version of FBUS code (fbus-3110.c), the way
in which message types are reported from the link to the statemachine
can be adjusted. (This is along the lines of what Bozo suggested a while
ago, only a bit less crude.)

So what the link code now does is that it folds the related message
types (e.g. SMS sent OK (0x28) and SMS sent error (0x29)) into one and
only reports the type for the succesful action (here 0x28) to the
statemachine. The driver can thus wait for only this one type of message
with the normal sm_block(), and the incoming functions check which one
of the two actually happened by looking at message[0]. In my opinion
this is not as ugly as it may first seem because the other phone drivers
actually do quite the same thing, only their protocol is different and
only has one message type for each type of reply so no folding has to be
done.

Here is a patch that does the folding in the 3110 link code and also
unfolds the message types on the 3110 driver side. Note that the driver
side update is not complete because all the operations that previously
needed sm_block_many() (in the current CVS actually inlined versions of
it) need to be rewritten. They should become much cleaner now, but I am
waiting first to see whether this approach is accepted.

I would very much like to get 3110 support in for the 0.5.0 release, but
of course I don't want to delay it further just because of the 3110. I
hope that you (Pawel) could accept this patch a solution to the
sm_block_many() problem and could fix the statemachine code e.g. with
the one-line patch I posted 2 days ago in the (so far) last message in
the statemachine thread. In that case the infrastructure of gnokii no
longer hurts 3110 driver development, so I can submit the last bits
quickly. I'm not planning very extensive support, only SMS operations
and perhaps phonebook too.

-Osma

-- 
*** Osma Suominen *** address@hidden *** http://www.iki.fi/ozone/ ***




reply via email to

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