[Top][All Lists]

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

Solved Bug in xgnokii , sending a SMS

From: Ulrich Hopp
Subject: Solved Bug in xgnokii , sending a SMS
Date: Sat, 7 Dec 2002 18:29:38 +0100
User-agent: KMail/1.4.3


gnokii : latest version from CVS 0.5.0pre2 (07.12.2002)
Phone : Nokia 6310 V 4.10 04-01-02 NPE-4
Cabel : DLR3-3P
System SuSE 8.1 ( ftp update )

Bug description :

When sending a SMS and choosing an addressee out of the phonebook or entering 
a number with a corresponding phonebook entry I got the error message :

Adress line contains illiegal adress.

Happens only with phonebook entries with leading or trailing white spaces, 
spaces or tabs.

When xgnokii puts the phonebook entry to the adress line it "g_strstrip"s the 
phonebook entry. ( => xgnokii_sms.c, line 766 )
( g_strstrip : a glib function which removes all leading and trailing white 
spaces, spaces and tabs )
When the SMS should be sent, xgnokii looks for the corresponding number in the 
phonebook by comparing all phonebook entries with the adress line. Because in 
GUI_GetNumber ( xgnokii_contacts.c, line 3252 ) the phonebook entry is not 
"g_strstrip"ped no match is found and the error message appears.

Patch :

Although name is already "g_strstip"ped it is save to do it here again. I 
think this makes it more "error resistant".

--- xgnokii_contacts.c.orig     2002-12-07 17:36:06.000000000 +0100
+++ xgnokii_contacts.c  2002-12-07 17:36:57.000000000 +0100
@@ -3263,7 +3263,7 @@
                if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted)

-               if (strcmp(pbEntry->entry.Name, name) == 0)
+               if (strcmp(g_strstrip(pbEntry->entry.Name), g_strstrip(name)) 
== 0)
                        return pbEntry->entry.Number;


reply via email to

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