The NAN subscribe and publish cancellation commands used incorrect
parameter names and there was not enough time to allow the cancellation
to occur before terminating the parallel group. Fix these to avoid
reporting failures due to a race condition and parallel operations in
the end.
Signed-off-by: Jouni Malinen <jouni.malinen@oss.qualcomm.com>
if "ssi=6677" not in ev.split(' '):
raise Exception("Unexpected ssi: " + ev)
- dev[0].request("NAN_CANCEL_SUBSCRIBE id=" + id0)
- dev[1].request("NAN_CANCEL_PUBLISH id=" + id1)
+ if "OK" not in dev[0].request("NAN_CANCEL_SUBSCRIBE subscribe_id=" + id0):
+ raise Exception("NAN_CANCEL_SUBSCRIBE failed")
+ if "OK" not in dev[1].request("NAN_CANCEL_PUBLISH publish_id=" + id1):
+ raise Exception("NAN_CANCEL_PUBLISH failed")
+ time.sleep(1)
dev[1].remove_group()
dev[0].wait_go_ending_session()