aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWitold Sowa <witold.sowa@gmail.com>2009-12-03 21:17:49 +0200
committerJouni Malinen <j@w1.fi>2009-12-03 21:17:49 +0200
commit85d3f273df0aae8dfe25ab12ea8f814f3f2bf146 (patch)
tree0c81c2bda1c77f945e9f13b2daedc3c87445e959
parenta5717c957c240d4d26f3313b39a2f6faef4e8c1c (diff)
downloadexternal_wpa_supplicant_8_ti-85d3f273df0aae8dfe25ab12ea8f814f3f2bf146.zip
external_wpa_supplicant_8_ti-85d3f273df0aae8dfe25ab12ea8f814f3f2bf146.tar.gz
external_wpa_supplicant_8_ti-85d3f273df0aae8dfe25ab12ea8f814f3f2bf146.tar.bz2
dbus: switch dbus APIs initialization order
Initialize the new DBus API before the old one, so new applications which can use both, the old and the new API will be notified first that new API is available.
-rw-r--r--wpa_supplicant/notify.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index 7ebe8b6..aa3d548 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -27,17 +27,17 @@ int wpas_notify_supplicant_initialized(struct wpa_global *global)
struct wpas_dbus_callbacks *cbs = wpas_dbus_get_callbacks();
if (global->params.dbus_ctrl_interface) {
- global->dbus_ctrl_iface =
- wpa_supplicant_dbus_ctrl_iface_init(global);
- if (global->dbus_ctrl_iface == NULL)
- return -1;
-
if (cbs) {
global->dbus_new_ctrl_iface =
cbs->dbus_ctrl_init(global);
if (global->dbus_new_ctrl_iface == NULL)
return -1;
}
+
+ global->dbus_ctrl_iface =
+ wpa_supplicant_dbus_ctrl_iface_init(global);
+ if (global->dbus_ctrl_iface == NULL)
+ return -1;
}
return 0;
@@ -48,11 +48,11 @@ void wpas_notify_supplicant_deinitialized(struct wpa_global *global)
{
struct wpas_dbus_callbacks *cbs = wpas_dbus_get_callbacks();
- if (global->dbus_ctrl_iface)
- wpa_supplicant_dbus_ctrl_iface_deinit(global->dbus_ctrl_iface);
-
if (cbs && global->dbus_new_ctrl_iface)
cbs->dbus_ctrl_deinit(global->dbus_new_ctrl_iface);
+
+ if (global->dbus_ctrl_iface)
+ wpa_supplicant_dbus_ctrl_iface_deinit(global->dbus_ctrl_iface);
}