P2P: Notify device expiry via P2P-DEVICE-LOST event

This patch will notify applications listening over control socket about
the device expiry [from p2p peer list].
This commit is contained in:
Jithu Jance 2011-10-28 22:13:18 +03:00 committed by Jouni Malinen
parent 8271f14a4d
commit 3074d8f12d
2 changed files with 7 additions and 0 deletions

View file

@ -99,6 +99,10 @@ extern "C" {
/** P2P device found */ /** P2P device found */
#define P2P_EVENT_DEVICE_FOUND "P2P-DEVICE-FOUND " #define P2P_EVENT_DEVICE_FOUND "P2P-DEVICE-FOUND "
/** P2P device lost */
#define P2P_EVENT_DEVICE_LOST "P2P-DEVICE-LOST "
/** A P2P device requested GO negotiation, but we were not ready to start the /** A P2P device requested GO negotiation, but we were not ready to start the
* negotiation */ * negotiation */
#define P2P_EVENT_GO_NEG_REQUEST "P2P-GO-NEG-REQUEST " #define P2P_EVENT_GO_NEG_REQUEST "P2P-GO-NEG-REQUEST "

View file

@ -983,6 +983,9 @@ static void wpas_dev_lost(void *ctx, const u8 *dev_addr)
{ {
struct wpa_supplicant *wpa_s = ctx; struct wpa_supplicant *wpa_s = ctx;
wpa_msg(wpa_s, MSG_INFO, P2P_EVENT_DEVICE_LOST
"p2p_dev_addr=" MACSTR, MAC2STR(dev_addr));
wpas_notify_p2p_device_lost(wpa_s, dev_addr); wpas_notify_p2p_device_lost(wpa_s, dev_addr);
} }