gnokii-users
[Top][All Lists]
Advanced

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

Re: Problem with AT driver.


From: Ladislav Michl
Subject: Re: Problem with AT driver.
Date: Wed, 29 Jan 2003 12:16:10 +0000
User-agent: Mutt/1.2.5.1i

On Wed, Jan 29, 2003 at 12:08:35PM +0100, Pawel Kot wrote:
> >>> address@hidden 29 January 2003 04:17:02 >>>
> > The problem is that the length of the message is calculated
> incorrectly.
> > Currently the length includes the sms message center #. In your
> message
> > the length command (AT+CMGS=25) should be reduced by 8 octets. I put
> a
> > hack in my code, and it works, but the code needs to be modified to
> > include different message center formats... I will try to post a fix
> > this weekend.
> 
> Correct, thanks for spotting. We have even the correct comment in the
> code:
> /* Length in AT mode is the length of the full message minus SMSC field
> length */
> The quick fix (pseudopatch) is:
> +     sprintf(req, "AT+%s=%d\r", cmd, length -
> data->RawSMS->MessageCenter[0] - 2);
> -     sprintf(req, "AT+%s=%d\r", cmd, length - 1);

that's it. i reimplemented this function a little bit to avoid buffer
overflows. i'll commit it after some more tests.

        ladis




reply via email to

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