From cf78e2acc8e65a276dee14e90f424df56f5ddc6e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 10 Feb 2013 16:27:59 +0200 Subject: [PATCH] WPS: Clean up debug prints with nfcpy Signed-hostap: Jouni Malinen --- wpa_supplicant/examples/wps-nfc.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/examples/wps-nfc.py b/wpa_supplicant/examples/wps-nfc.py index 9830a22cb..f6c9e605f 100755 --- a/wpa_supplicant/examples/wps-nfc.py +++ b/wpa_supplicant/examples/wps-nfc.py @@ -75,7 +75,8 @@ def wps_handover_init(peer): return print "Handover request from wpa_supplicant: " + data.encode("hex") message = nfc.ndef.Message(data) - print "Parsed handover request: " + message.pretty() + print "Parsed handover request:" + print message.pretty() nfc.llcp.activate(peer); @@ -97,6 +98,12 @@ def wps_handover_init(peer): print "Receiving handover response" message = client._recv() + if message is None: + print "No response received" + nfc.llcp.shutdown() + client.close() + return + print "Handover select received" print message.pretty() wpas_put_handover_sel(message)