OSDN Git Service

am 0cc49e8d: Add BOARD_WLAN_DEVICE=mrvl check for ANDROID_P2P support
[android-x86/external-wpa_supplicant_8.git] / wpa_supplicant / ctrl_iface.c
index 480c077..bcf27be 100644 (file)
@@ -3547,7 +3547,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
        char *pos;
        int id;
        struct wpa_ssid *ssid;
-       u8 peer[ETH_ALEN];
+       u8 *_peer = NULL, peer[ETH_ALEN];
        int freq = 0;
        int ht40;
 
@@ -3557,6 +3557,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
                pos += 6;
                if (hwaddr_aton(pos, peer))
                        return -1;
+               _peer = peer;
        }
        ssid = wpa_config_get_network(wpa_s->conf, id);
        if (ssid == NULL || ssid->disabled != 2) {
@@ -3576,8 +3577,7 @@ static int p2p_ctrl_invite_persistent(struct wpa_supplicant *wpa_s, char *cmd)
 
        ht40 = os_strstr(cmd, " ht40") != NULL;
 
-       return wpas_p2p_invite(wpa_s, pos ? peer : NULL, ssid, NULL, freq,
-                              ht40);
+       return wpas_p2p_invite(wpa_s, _peer, ssid, NULL, freq, ht40);
 }
 
 
@@ -4401,6 +4401,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
                        level = MSG_EXCESSIVE;
                wpa_hexdump_ascii(level, "RX ctrl_iface",
                                  (const u8 *) buf, os_strlen(buf));
+               wpa_dbg(wpa_s, level, "Control interface command '%s'", buf);
        }
 
        reply = os_malloc(reply_size);