summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-10-01 15:19:30 +0200
committerThomas Haller <thaller@redhat.com>2015-10-01 15:19:31 +0200
commit51e2ccaeaabedc8e58fe4a9ee469847163ef0fe5 (patch)
tree2f48c263bb73149a834e1ed2b9dfe65e52870add
parent19c36b3f36b51b484a395cba66e69a9dc84b45f5 (diff)
downloadNetworkManager-jk/wifi-scan-list-rh1267327.tar.gz
fixup! wifi: emit NEW_BSS on ScanDone to update APs in Wi-Fi device (rh #1267327)jk/wifi-scan-list-rh1267327
change the order of the condition. We don't have to create @props, if the proxy isn't initiated yet.
-rw-r--r--src/supplicant-manager/nm-supplicant-interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/supplicant-manager/nm-supplicant-interface.c b/src/supplicant-manager/nm-supplicant-interface.c
index 60939572db..30be23aec7 100644
--- a/src/supplicant-manager/nm-supplicant-interface.c
+++ b/src/supplicant-manager/nm-supplicant-interface.c
@@ -535,14 +535,14 @@ signal_cb (GDBusProxy *proxy,
/* Emit NEW_BSS so that wifi device has the APs (in case it removed them) */
g_hash_table_iter_init (&iter, priv->bss_proxies);
while (g_hash_table_iter_next (&iter, (gpointer) &bss_path, (gpointer) &bss_proxy)) {
- props = _get_bss_proxy_properties (self, bss_proxy);
- if (props) {
- if (g_object_get_data (G_OBJECT (bss_proxy), BSS_PROXY_INITED) != NULL) {
+ if (g_object_get_data (G_OBJECT (bss_proxy), BSS_PROXY_INITED)) {
+ props = _get_bss_proxy_properties (self, bss_proxy);
+ if (props) {
g_signal_emit (self, signals[NEW_BSS], 0,
bss_path,
g_variant_ref_sink (props));
+ g_variant_unref (props);
}
- g_variant_unref (props);
}
}
} else if (MATCH_SIGNAL (signal, "BSSAdded", args, G_VARIANT_TYPE ("(oa{sv})"))) {