[PATCH] P2P: Add missing parameter for P2P_GROUP_ADD command

Marcin.Klimczewski at tieto.com Marcin.Klimczewski at tieto.com
Thu Jun 30 08:59:15 EDT 2011


---
 wpa_supplicant/wpa_cli.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index a1db53a..9439856 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -1786,7 +1786,12 @@ static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc,
        if (argc == 0)
                return wpa_ctrl_command(ctrl, "P2P_GROUP_ADD");

-       res = os_snprintf(cmd, sizeof(cmd), "P2P_GROUP_ADD %s", argv[0]);
+       if (argc > 1)
+               res = os_snprintf(cmd, sizeof(cmd), "P2P_GROUP_ADD %s %s",
+                                 argv[0], argv[1]);
+       else
+               res = os_snprintf(cmd, sizeof(cmd), "P2P_GROUP_ADD %s",
+                                 argv[0]);
        if (res < 0 || (size_t) res >= sizeof(cmd))
                return -1;
        cmd[sizeof(cmd) - 1] = '\0';
--
1.7.4.1

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110630/22ada66b/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-P2P-Add-missing-parameter-for-P2P_GROUP_ADD-command.patch
Type: application/octet-stream
Size: 1093 bytes
Desc: 0001-P2P-Add-missing-parameter-for-P2P_GROUP_ADD-command.patch
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20110630/22ada66b/attachment.obj 


More information about the HostAP mailing list