]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: No need to recompute group object path on GroupStarted signal
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 14 May 2014 13:10:41 +0000 (16:10 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 16 May 2014 15:20:17 +0000 (18:20 +0300)
The group object is already registered on DBus at that point, thus wpa_s
structure holds its path already.

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
wpa_supplicant/dbus/dbus_new.c

index 0dd9502d36716416912bc432d00f81c15f4e80a8..6bd2a40c0c67d37ebbb64148850faccb3d29e2d6 100644 (file)
@@ -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;