From 68d270069f728db8a720c69d6ce5eafcef90689d Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 14 May 2014 16:10:41 +0300 Subject: [PATCH] dbus: No need to recompute group object path on GroupStarted signal The group object is already registered on DBus at that point, thus wpa_s structure holds its path already. Signed-off-by: Tomasz Bursztyka --- wpa_supplicant/dbus/dbus_new.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c index 0dd9502d3..6bd2a40c0 100644 --- a/wpa_supplicant/dbus/dbus_new.c +++ b/wpa_supplicant/dbus/dbus_new.c @@ -1169,7 +1169,6 @@ void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s, DBusMessage *msg; DBusMessageIter iter, dict_iter; struct wpas_dbus_priv *iface; - char group_obj_path[WPAS_DBUS_OBJECT_PATH_MAX]; iface = wpa_s->parent->global->dbus; @@ -1177,14 +1176,13 @@ void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s, if (iface == NULL) return; - if (wpas_dbus_get_group_obj_path(wpa_s, ssid, group_obj_path) < 0) + if (wpa_s->dbus_groupobj_path == NULL) return; /* New interface has been created for this group */ msg = dbus_message_new_signal(wpa_s->parent->dbus_new_path, WPAS_DBUS_NEW_IFACE_P2PDEVICE, "GroupStarted"); - if (msg == NULL) return; @@ -1207,7 +1205,7 @@ void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s, goto nomem; if (!wpa_dbus_dict_append_object_path(&dict_iter, "group_object", - group_obj_path) || + wpa_s->dbus_groupobj_path) || !wpa_dbus_dict_close_write(&iter, &dict_iter)) goto nomem;