From e9d1ca7f7bbbd6dc7998d72b750b482485035ad5 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Tue, 16 Aug 2016 15:27:16 -0500 Subject: [PATCH] wscutil: Don't include request_to_enroll if false --- src/wscutil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wscutil.c b/src/wscutil.c index 3d4e536a..1feac708 100644 --- a/src/wscutil.c +++ b/src/wscutil.c @@ -1242,6 +1242,10 @@ uint8_t *wsc_build_probe_request(const struct wsc_probe_request *probe_request, wsc_attr_builder_put_u8(builder, WSC_WFA_EXTENSION_VERSION2); wsc_attr_builder_put_u8(builder, 1); wsc_attr_builder_put_u8(builder, 0x20); + + if (!probe_request->request_to_enroll) + goto done; + wsc_attr_builder_put_u8(builder, WSC_WFA_EXTENSION_REQUEST_TO_ENROLL); wsc_attr_builder_put_u8(builder, 1); wsc_attr_builder_put_u8(builder, 1);