From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8388474865663470043==" MIME-Version: 1.0 From: Denis Kenzior Subject: Re: [PATCH 2/3] stk: Handle provide local info proactive command Date: Mon, 29 Nov 2010 07:47:26 -0600 Message-ID: <4CF3AEEE.6090808@gmail.com> In-Reply-To: List-Id: To: ofono@ofono.org --===============8388474865663470043== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Yang, On 11/28/2010 08:47 PM, Gu, Yang wrote: > Hi Denis, > = >>> diff --git a/src/smsutil.c b/src/smsutil.c >>> index e6dbf5f..5394817 100644 >>> --- a/src/smsutil.c >>> +++ b/src/smsutil.c >>> @@ -324,10 +324,10 @@ gboolean sms_encode_scts(const struct sms_scts *i= n, >> unsigned char *pdu, >>> if (in->year > 99) >>> return FALSE; >>> >>> - if (in->month > 12) >>> + if (in->month > 12 || in->month =3D=3D 0) >>> return FALSE; >>> >>> - if (in->day > 31) >>> + if (in->day > 31 || in->day =3D=3D 0) >>> return FALSE; >>> >>> if (in->hour > 23) >>> @@ -339,7 +339,7 @@ gboolean sms_encode_scts(const struct sms_scts *in, >> unsigned char *pdu, >>> if (in->second > 59) >>> return FALSE; >>> >>> - if ((in->timezone > 12*4-1) || (in->timezone < -(12*4-1))) >>> + if ((in->timezone > 12*4) || (in->timezone < -(12*4-1))) >> >> Err, why would +48 be valid? > = > I think all the timezone should be a circle (24 hours). If it can't be -4= 8, it needs to contain +48. = > Also please see 9.2.6.9 in http://gsm-history.org/fileadmin/user_upload/K= ey_SMS_Documents/GSM_Rec_03.40_v_2.2.0.pdf, which says "The Time Zone may b= e a number in the range -47 to +48". > = Ok, fair enough. Though do note that the timezone field must account for daylight savings time. So in theory GMT+14 and GMT-12 are valid timezone values as well. See http://en.wikipedia.org/wiki/List_of_time_zones_by_UTC_offset Regards, -Denis --===============8388474865663470043==--