Ignore broken network identifiers
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2008 05:43:37 +0000 (07:43 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 30 Jul 2008 05:43:37 +0000 (07:43 +0200)
plugins/wifi.c

index 30d94f2..9f93d96 100644 (file)
@@ -68,6 +68,12 @@ static void scan_result(struct connman_element *parent,
        if (data == NULL)
                return;
 
+       if (network->identifier == NULL)
+               return;
+
+       if (network->identifier[0] == '\0')
+               return;
+
        temp = g_strdup(network->identifier);
 
        for (i = 0; i < strlen(temp); i++) {