3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

wsc: Don't start connections until Cancel finishes

Return busy from StartPin and PushButton if the Cancel method is still
running.
This commit is contained in:
Andrew Zaborowski 2020-03-19 22:12:13 +01:00 committed by Denis Kenzior
parent 485cb4d375
commit 4abafd8eea

View File

@ -1111,7 +1111,7 @@ static struct l_dbus_message *wsc_push_button(struct l_dbus *dbus,
if (!l_dbus_message_get_arguments(message, ""))
return dbus_error_invalid_args(message);
if (wsc->pending_connect)
if (wsc->pending_connect || wsc->pending_cancel)
return dbus_error_busy(message);
wsc->pending_connect = l_dbus_message_ref(message);
@ -1150,7 +1150,7 @@ static struct l_dbus_message *wsc_start_pin(struct l_dbus *dbus,
l_debug("");
if (wsc->pending_connect)
if (wsc->pending_connect || wsc->pending_cancel)
return dbus_error_busy(message);
if (!l_dbus_message_get_arguments(message, "s", &pin))