From 8273896b154f71d50e231cd7091b3a623cd5c122 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Wed, 6 Nov 2013 17:28:37 +0100 Subject: owfd: wpa: make name-arg required for P2P_DEVICE_FOUND We currently allow name==NULL, which might cause breakage for some clients. Always require the name argument or return EINVAL. Signed-off-by: David Herrmann --- src/wpa_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wpa_parser.c b/src/wpa_parser.c index 1779eb5..4789f01 100644 --- a/src/wpa_parser.c +++ b/src/wpa_parser.c @@ -253,10 +253,10 @@ static int parse_p2p_device_found(struct owfd_wpa_event *ev, if (!ev->p.p2p_device_found.name) return -ENOMEM; - break; + return 0; } - return 0; + return -EINVAL; } static int parse_p2p_prov_disc_show_pin(struct owfd_wpa_event *ev, -- cgit v1.2.3