summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 17:28:37 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2013-11-06 17:28:37 +0100
commit8273896b154f71d50e231cd7091b3a623cd5c122 (patch)
tree20beaf08b0f032ad35c76843200b5d1614456e02
parent5f5442b6db684a8233bafc96fcd62ec3c2ca0d66 (diff)
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 <dh.herrmann@gmail.com>
-rw-r--r--src/wpa_parser.c4
1 files 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,