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 <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
f3734e2377
commit
68d270069f
1 changed files with 2 additions and 4 deletions
|
@ -1169,7 +1169,6 @@ void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s,
|
||||||
DBusMessage *msg;
|
DBusMessage *msg;
|
||||||
DBusMessageIter iter, dict_iter;
|
DBusMessageIter iter, dict_iter;
|
||||||
struct wpas_dbus_priv *iface;
|
struct wpas_dbus_priv *iface;
|
||||||
char group_obj_path[WPAS_DBUS_OBJECT_PATH_MAX];
|
|
||||||
|
|
||||||
iface = wpa_s->parent->global->dbus;
|
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)
|
if (iface == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (wpas_dbus_get_group_obj_path(wpa_s, ssid, group_obj_path) < 0)
|
if (wpa_s->dbus_groupobj_path == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* New interface has been created for this group */
|
/* New interface has been created for this group */
|
||||||
msg = dbus_message_new_signal(wpa_s->parent->dbus_new_path,
|
msg = dbus_message_new_signal(wpa_s->parent->dbus_new_path,
|
||||||
WPAS_DBUS_NEW_IFACE_P2PDEVICE,
|
WPAS_DBUS_NEW_IFACE_P2PDEVICE,
|
||||||
"GroupStarted");
|
"GroupStarted");
|
||||||
|
|
||||||
if (msg == NULL)
|
if (msg == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1207,7 +1205,7 @@ void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s,
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
if (!wpa_dbus_dict_append_object_path(&dict_iter, "group_object",
|
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))
|
!wpa_dbus_dict_close_write(&iter, &dict_iter))
|
||||||
goto nomem;
|
goto nomem;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue