gnokii-users
[Top][All Lists]
Advanced

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

Re: [patch] Fix sending SMSes with certain phones.


From: David Vrabel
Subject: Re: [patch] Fix sending SMSes with certain phones.
Date: Tue, 11 Jan 2005 10:32:19 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041124)

Your proposition is:
-       if (type == GN_GSM_NUMBER_International) in_num++; /* Skip '+' */
- if ((type == GN_GSM_NUMBER_Unknown) && (*in_num == '+')) in_num++; /* Optional '+' in Unknown number type */
+       if (*in_num == '+') in_num++; /* skip any leading + */

What about:
if ((type == GN_GSM_NUMBER_International || type == GN_GSM_NUMBER_Unknown) && (*in_num == '+')) in_num++; /* skip '+' in international numbers */
?

That would work too.  Updated patch attached.

David Vrabel
--
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
--- gnokii-0.6.4/common/gsm-encoding.c.old      Sun Oct 17 20:44:20 2004
+++ gnokii-0.6.4/common/gsm-encoding.c  Tue Jan 11 10:27:24 2005
@@ -519,8 +519,9 @@
           only international and unknown number. */
 
        *out_num++ = type;
-       if (type == GN_GSM_NUMBER_International) in_num++; /* Skip '+' */
-       if ((type == GN_GSM_NUMBER_Unknown) && (*in_num == '+')) in_num++; /* 
Optional '+' in Unknown number type */
+
+       if ((type == GN_GSM_NUMBER_International || type ==  
GN_GSM_NUMBER_Unknown) && *in_num == '+')
+               in_num++; /* skip leading '+' */
 
        /* The next field is the number. It is in semi-octet representation - 
see
           GSM scpecification 03.40 version 6.1.0, section 9.1.2.3, page 31. */

reply via email to

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