__supplicant_start(iface);
- __supplicant_connect(iface, data->network, data->passphrase);
+ if (data->network != NULL)
+ __supplicant_connect(iface, data->network, data->passphrase);
return 0;
}
printf("[802.11] disconnect %s\n", data->ifname);
+ if (data->network != NULL)
+ __supplicant_disconnect(iface);
+
__supplicant_stop(iface);
return 0;
printf("[802.11] set network %s\n", data->ifname);
+ if (data->network != NULL)
+ __supplicant_disconnect(iface);
+
g_free(data->network);
data->network = g_strdup(network);
+
+ if (data->network != NULL)
+ __supplicant_connect(iface, data->network, data->passphrase);
}
static void iface_set_passphrase(struct connman_iface *iface,
printf("[802.11] set passphrase %s\n", data->ifname);
+ if (data->network != NULL)
+ __supplicant_disconnect(iface);
+
g_free(data->passphrase);
data->passphrase = g_strdup(passphrase);
+
+ if (data->network != NULL)
+ __supplicant_connect(iface, data->network, data->passphrase);
}
static void parse_genie(struct station_data *station,