summaryrefslogtreecommitdiff
path: root/packages/e17/illume/gsm-segfault.patch
blob: f9fc2645b61f8f1f27834f30566606ff0d78c665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Index: illume/src/e_mod_gad_gsm.c
===================================================================
--- illume.orig/src/e_mod_gad_gsm.c	2008-11-10 16:15:08.000000000 +0000
+++ illume/src/e_mod_gad_gsm.c	2008-11-10 16:16:23.000000000 +0000
@@ -357,7 +357,7 @@
 {
    /* We care only about the provider name right now. All the other status
     * informations get ingnored for the gadget for now */
-   const char *provider, *name, *reg_stat;
+   const char *provider = 0 , *name = 0, *reg_stat = 0;
    DBusMessageIter iter, a_iter, s_iter, v_iter;
    
    if (!dbus_message_has_signature(msg, "a{sv}")) return NULL;
@@ -384,10 +384,13 @@
 	dbus_message_iter_next(&a_iter);
      }
    
+   if (!reg_stat) return NULL;
    if (strcmp(reg_stat, "unregistered") == 0) provider = "No Service";
    else if (strcmp(reg_stat, "busy") == 0) provider = "Searching...";
    else if (strcmp(reg_stat, "denied") == 0) provider = "SOS only";
    
+   if (!provider) return NULL;
+
    return strdup(provider);
 }