Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fwife.git;a=commitdiff;h=81b7f5d38d6595432f93aca3d151aa5f2fb2831d
commit 81b7f5d38d6595432f93aca3d151aa5f2fb2831d Author: Elentir <elen...@mailoo.org> Date: Mon Jan 18 22:42:08 2010 +0100 configsource: drop wifi access points with bad essid from the list diff --git a/src/plugins/configsource.c b/src/plugins/configsource.c index be55674..c2ee6e4 100644 --- a/src/plugins/configsource.c +++ b/src/plugins/configsource.c @@ -503,8 +503,10 @@ GList *list_entry_points(char *ifacename) while (getline(&line, &len, fp) != -1) { if((tok = strstr(line, "Address: ")) != NULL) { - if(ap != NULL) + if(ap != NULL && ap->essid != NULL && strcmp(ap->essid, "")) entrys = g_list_append(entrys, ap); + else + free_wifi_ap(ap); ap = malloc(sizeof(struct wifi_ap)); memset(ap, 0, sizeof(struct wifi_ap)); @@ -564,8 +566,10 @@ GList *list_entry_points(char *ifacename) } } - if(ap != NULL) + if(ap != NULL && ap->essid != NULL && strcmp(ap->essid, "")) entrys = g_list_append(entrys, ap); + else + free_wifi_ap(ap); free(line); free(command); _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git