diff options
author | Robert Tiemann <rtie@gmx.de> | 2018-01-15 10:21:28 +0100 |
---|---|---|
committer | Daniel Wagner <wagi@monom.org> | 2018-01-21 19:48:58 +0100 |
commit | ab9c0dd1072b0e8452826bea07193b8c7dd9e575 (patch) | |
tree | 468b8bd8771a4eebb689525522a74ccce0ba26ad /gsupplicant | |
parent | 0128ff9c4be2bb4eeece73006232f1c699ba5296 (diff) | |
download | connman-ab9c0dd1072b0e8452826bea07193b8c7dd9e575.tar.gz |
gsupplicant: Report changes of network WPS capabilities.
Diffstat (limited to 'gsupplicant')
-rw-r--r-- | gsupplicant/supplicant.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 8f6da417..5246c80b 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -1577,6 +1577,7 @@ static int add_or_replace_bss_to_network(struct g_supplicant_bss *bss) GSupplicantInterface *interface = bss->interface; GSupplicantNetwork *network; char *group; + bool is_new_network; group = create_group(bss); SUPPLICANT_DBG("New group created: %s", group); @@ -1588,10 +1589,13 @@ static int add_or_replace_bss_to_network(struct g_supplicant_bss *bss) if (network) { g_free(group); SUPPLICANT_DBG("Network %s already exist", network->name); + is_new_network = false; goto done; } + is_new_network = true; + network = g_try_new0(GSupplicantNetwork, 1); if (!network) { g_free(group); @@ -1634,6 +1638,9 @@ done: if ((bss->keymgmt & G_SUPPLICANT_KEYMGMT_WPS) != 0) { network->wps = TRUE; network->wps_capabilities = bss->wps_capabilities; + + if (!is_new_network) + callback_network_changed(network, "WPSCapabilities"); } /* @@ -2807,8 +2814,10 @@ static void signal_bss_changed(const char *path, DBusMessageIter *iter) old_wps_capabilities = network->wps_capabilities; - if (old_wps_capabilities != bss->wps_capabilities) + if (old_wps_capabilities != bss->wps_capabilities) { network->wps_capabilities = bss->wps_capabilities; + callback_network_changed(network, "WPSCapabilities"); + } /* Consider only property changes of the connected BSS */ if (network == interface->current_network && bss != network->best_bss) |