dpp-nfc: Stop only_one run after failed handover attempt
Do not require connection handover to succeed before stopping the loop in the only_one case. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
f7b5a1d347
commit
4d54618424
1 changed files with 4 additions and 2 deletions
|
@ -907,6 +907,7 @@ class ConnectionHandover():
|
||||||
self.start_client_alt = False
|
self.start_client_alt = False
|
||||||
self.terminate_on_hs_send_completion = False
|
self.terminate_on_hs_send_completion = False
|
||||||
self.try_own = False
|
self.try_own = False
|
||||||
|
self.connected = False
|
||||||
|
|
||||||
def start_handover_server(self, llc):
|
def start_handover_server(self, llc):
|
||||||
summary("Start handover server")
|
summary("Start handover server")
|
||||||
|
@ -939,6 +940,7 @@ def llcp_startup(llc):
|
||||||
def llcp_connected(llc):
|
def llcp_connected(llc):
|
||||||
summary("P2P LLCP connected")
|
summary("P2P LLCP connected")
|
||||||
global handover
|
global handover
|
||||||
|
handover.connected = True
|
||||||
handover.srv.start()
|
handover.srv.start()
|
||||||
if init_on_touch or not no_input:
|
if init_on_touch or not no_input:
|
||||||
handover.client_thread = threading.Thread(target=llcp_worker,
|
handover.client_thread = threading.Thread(target=llcp_worker,
|
||||||
|
@ -1129,8 +1131,8 @@ def main():
|
||||||
summary("clf.connect failed: " + str(e))
|
summary("clf.connect failed: " + str(e))
|
||||||
break
|
break
|
||||||
|
|
||||||
if only_one and handover.srv and handover.srv.success:
|
if only_one and handover.connected:
|
||||||
raise SystemExit
|
break
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
Loading…
Reference in a new issue