Patchwork DBus: Removing network_object dictionary entry from signal GroupStarted

login
register
mail settings
Submitter Michael Naumov
Date July 25, 2012, 5:20 p.m.
Message ID <1343236808-3456-1-git-send-email-michael.naumov@intel.com>
Download mbox | patch
Permalink /patch/173223/
State Accepted
Commit a5195e56e89ccb32badb143810eb34f3936538ba
Headers show

Comments

Michael Naumov - July 25, 2012, 5:20 p.m.
The network_object path should be returned by the NetworkAdded signal and 
not by the GroupStarted Signal. Starting a Group does not necessarily 
validate the network object.

Signed-hostap: Michael Naumov <michael.naumov@intel.com>
Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
intended-for: hostap-1
---
 wpa_supplicant/dbus/dbus_new.c |    7 -------
 1 file changed, 7 deletions(-)
Jouni Malinen - Aug. 4, 2012, 9:27 p.m.
On Wed, Jul 25, 2012 at 10:20:08AM -0700, Michael Naumov wrote:
> The network_object path should be returned by the NetworkAdded signal and 
> not by the GroupStarted Signal. Starting a Group does not necessarily 
> validate the network object.

Thanks, applied.

Patch

diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index a9957ab..e2b1e49 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -1104,7 +1104,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 net_obj_path[WPAS_DBUS_OBJECT_PATH_MAX];
 	char group_obj_path[WPAS_DBUS_OBJECT_PATH_MAX];
 
 	iface = wpa_s->parent->global->dbus;
@@ -1142,14 +1141,8 @@  void wpas_dbus_signal_p2p_group_started(struct wpa_supplicant *wpa_s,
 					 client ? "client" : "GO"))
 		goto nomem;
 
-	os_snprintf(net_obj_path, WPAS_DBUS_OBJECT_PATH_MAX,
-		    "%s/" WPAS_DBUS_NEW_NETWORKS_PART "/%u",
-		    wpa_s->parent->dbus_new_path, network_id);
-
 	if (!wpa_dbus_dict_append_object_path(&dict_iter, "group_object",
 					     group_obj_path) ||
-	   !wpa_dbus_dict_append_object_path(&dict_iter, "network_object",
-					     net_obj_path) ||
 	   !wpa_dbus_dict_close_write(&iter, &dict_iter))
 		goto nomem;