From 34d45ea0b62eab60038ecf800fcb6a6d14715a1f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 12 Oct 2014 16:45:33 +0300 Subject: [PATCH] P2P: Add new=0/1 flag to P2P-DEVICE-FOUND events This information can be used to determine whether the event is generated for a new peer that was added or due to an update in the information for an existing peer. Signed-off-by: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 2aaee1fa3..f1aab72e4 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -1735,7 +1735,7 @@ static void wpas_dev_found(void *ctx, const u8 *addr, wpa_msg_global(wpa_s, MSG_INFO, P2P_EVENT_DEVICE_FOUND MACSTR " p2p_dev_addr=" MACSTR " pri_dev_type=%s name='%s' config_methods=0x%x " - "dev_capab=0x%x group_capab=0x%x%s%s%s", + "dev_capab=0x%x group_capab=0x%x%s%s%s new=%d", MAC2STR(addr), MAC2STR(info->p2p_device_addr), wps_dev_type_bin2str(info->pri_dev_type, devtype, sizeof(devtype)), @@ -1743,7 +1743,8 @@ static void wpas_dev_found(void *ctx, const u8 *addr, info->dev_capab, info->group_capab, wfd_dev_info_hex ? " wfd_dev_info=0x" : "", wfd_dev_info_hex ? wfd_dev_info_hex : "", - info->vendor_elems ? " vendor_elems=1" : ""); + info->vendor_elems ? " vendor_elems=1" : "", + new_device); os_free(wfd_dev_info_hex); #endif /* CONFIG_NO_STDOUT_DEBUG */