[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 3110: prevent use of sm_block_many()
From: |
Chris Kemp |
Subject: |
Re: 3110: prevent use of sm_block_many() |
Date: |
Thu, 27 Feb 2003 20:20:11 +0000 |
On 2003.02.27 15:52 Osma Suominen wrote:
> 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
Ah, the first packet tells you the length (and so the number of packets
still to come) yes? If so, then yes the above is more sensible.
Chris