summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 08:55:05 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 08:55:05 +0100
commitc62df6fdff2a8cf583b288a16d95b09fb2686695 (patch)
tree98f3462c352ea7c46db98955c384d5a43d8a4310
parentcbe17aebe6250e92cf44543d79d37e0a80ca34cb (diff)
owfd: wpa: add P2P-FIND-STOPPED
This event is sent whenever the p2p-find procedure is stopped. We need to catch it in case other clients cause it to stop (or it's stopped implicitly through a connection procedure, etc). Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r--src/wpa.h1
-rw-r--r--src/wpa_parser.c1
-rw-r--r--test/test_wpa.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/src/wpa.h b/src/wpa.h
index 86ce195..af6c743 100644
--- a/src/wpa.h
+++ b/src/wpa.h
@@ -71,6 +71,7 @@ enum owfd_wpa_event_type {
OWFD_WPA_EVENT_AP_STA_CONNECTED,
OWFD_WPA_EVENT_AP_STA_DISCONNECTED,
OWFD_WPA_EVENT_P2P_DEVICE_FOUND,
+ OWFD_WPA_EVENT_P2P_FIND_STOPPED,
OWFD_WPA_EVENT_P2P_GO_NEG_REQUEST,
OWFD_WPA_EVENT_P2P_GO_NEG_SUCCESS,
OWFD_WPA_EVENT_P2P_GO_NEG_FAILURE,
diff --git a/src/wpa_parser.c b/src/wpa_parser.c
index 0ba935b..1779eb5 100644
--- a/src/wpa_parser.c
+++ b/src/wpa_parser.c
@@ -70,6 +70,7 @@ static const struct event_type {
EVENT("AP-STA-CONNECTED", AP_STA_CONNECTED),
EVENT("AP-STA-DISCONNECTED", AP_STA_DISCONNECTED),
EVENT("P2P-DEVICE-FOUND", P2P_DEVICE_FOUND),
+ EVENT("P2P-FIND-STOPPED", P2P_FIND_STOPPED),
EVENT("P2P-GO-NEG-FAILURE", P2P_GO_NEG_FAILURE),
EVENT("P2P-GO-NEG-REQUEST", P2P_GO_NEG_REQUEST),
EVENT("P2P-GO-NEG-SUCCESS", P2P_GO_NEG_SUCCESS),
diff --git a/test/test_wpa.c b/test/test_wpa.c
index f2a9760..68e0c2a 100644
--- a/test/test_wpa.c
+++ b/test/test_wpa.c
@@ -40,6 +40,7 @@ static const char *event_list[] = {
[OWFD_WPA_EVENT_AP_STA_CONNECTED] = "AP-STA-CONNECTED 00:00:00:00:00:00",
[OWFD_WPA_EVENT_AP_STA_DISCONNECTED] = "AP-STA-DISCONNECTED 00:00:00:00:00:00",
[OWFD_WPA_EVENT_P2P_DEVICE_FOUND] = "P2P-DEVICE-FOUND 00:00:00:00:00:00 name=some-name",
+ [OWFD_WPA_EVENT_P2P_FIND_STOPPED] = "P2P-FIND-STOPPED",
[OWFD_WPA_EVENT_P2P_GO_NEG_REQUEST] = "P2P-GO-NEG-REQUEST",
[OWFD_WPA_EVENT_P2P_GO_NEG_SUCCESS] = "P2P-GO-NEG-SUCCESS",
[OWFD_WPA_EVENT_P2P_GO_NEG_FAILURE] = "P2P-GO-NEG-FAILURE",