P2P: Fix disallowing of pending listen command to override connect

Commit d9bdba9f86 was supposed to allow
p2p_listen to schedule new after scan operation only if a p2p_connect
operation was not pending. However, it used incorrect P2P_AFTER_SCAN_
value for this and did not actually prevent overriding of p2p_connect
and could have caused some p2p_listen operations to be skipped
unnecessarily.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
This commit is contained in:
Jouni Malinen 2012-04-16 18:51:33 +03:00 committed by Jouni Malinen
parent e56fc9e81b
commit 5b9cecafaf

View file

@ -273,7 +273,7 @@ int p2p_listen(struct p2p_data *p2p, unsigned int timeout)
p2p->pending_listen_usec = (timeout % 1000) * 1000;
if (p2p->p2p_scan_running) {
if (p2p->start_after_scan == P2P_AFTER_SCAN_NOTHING) {
if (p2p->start_after_scan == P2P_AFTER_SCAN_CONNECT) {
wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
"P2P: p2p_scan running - connect is already "
"pending - skip listen");