3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

network: Check if network busy before new connection

Check if we have an ongoing agent call before starting a new connection
attempt and potentially overwriting network->agent_request.
This commit is contained in:
Andrew Zaborowski 2020-10-08 10:49:09 +02:00 committed by Denis Kenzior
parent 758dba214e
commit 9815fb38cf

View File

@ -1146,6 +1146,9 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus,
*/ */
return l_dbus_message_new_method_return(message); return l_dbus_message_new_method_return(message);
if (network->agent_request)
return dbus_error_busy(message);
/* /*
* Select the best BSS to use at this time. If we have to query the * Select the best BSS to use at this time. If we have to query the
* agent this may not be the final choice because BSS visibility can * agent this may not be the final choice because BSS visibility can
@ -1198,6 +1201,11 @@ void network_connect_new_hidden_network(struct network *network,
l_debug(""); l_debug("");
if (network->agent_request) {
error = dbus_error_busy(*message);
goto reply_error;
}
/* /*
* This is not a Known Network. If connection succeeds, either * This is not a Known Network. If connection succeeds, either
* network_sync_psk or network_connected will save this network * network_sync_psk or network_connected will save this network