gnokii-users
[Top][All Lists]
Advanced

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

Re: 3110: prevent use of sm_block_many()


From: Osma Suominen
Subject: Re: 3110: prevent use of sm_block_many()
Date: Thu, 27 Feb 2003 17:52:46 +0200 (EET)

On Thu, 27 Feb 2003, Christopher Kemp wrote:

> Yes, good point, that sounds fine to me - the message numbers used for the
> statemachine were not specifically supposed to be the message ids (eg AT
> mode).  Slight quibble though, don't you want to fold all except the last
> sms message into a dummy number and only return 0x28 when the last packet
> is successfully received by the incoming function?  So sm_block (with a
> large timeout to cover getting all the packets) waits until all the
> packets have been processed.

Um, no. At least I didn't think about doing it this way. I think it's
better for the GetSMS function in the 3110 driver code to work like
this:
- request SMS from the phone
- block waiting for header
  (if there's an error instead, return it)
- check out the length from the header
- while there is data still to be received,
  block waiting for a data packet (use no_retry version)
- process the data (e.g. copy over to data->raw_sms) if needed
- return success

So I'd rather do the processing in the 3110 driver code as before,
because in any case there can be between 0 and 3 data packets and the
link code doesn't know how many there'll be unless it looks it up from
the header.

You're right that this could be done in link code instead, but I'd
rather keep the link code as agnostic as possible about message
contents. The link code has its own layer to deal with anyway. The 3110
protocol is messy...

-Osma

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




reply via email to

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