From 55a366d7a8880d962a1a0855b758150814d8ebd1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 15 Aug 2020 00:19:46 +0300 Subject: [PATCH] dpp-nfc: Fix recv_octets() regression The updated socket.poll() loop did not terminate properly in cases where no response is available. Fix that to check for both False and None. Fixes: 1733e356e421 ("dpp-nfc: Fix handover client wait for receiving handover select") Signed-off-by: Jouni Malinen --- wpa_supplicant/examples/dpp-nfc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpa_supplicant/examples/dpp-nfc.py b/wpa_supplicant/examples/dpp-nfc.py index 83241330d..9f7fefb10 100755 --- a/wpa_supplicant/examples/dpp-nfc.py +++ b/wpa_supplicant/examples/dpp-nfc.py @@ -280,7 +280,7 @@ class HandoverClient(nfc.handover.HandoverClient): msg = bytearray() while True: poll_timeout = 0.1 if timeout is None or timeout > 0.1 else timeout - if self.socket.poll('recv', poll_timeout) is None: + if not self.socket.poll('recv', poll_timeout): if timeout: timeout -= time.time() - start if timeout <= 0: