mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +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:
parent
758dba214e
commit
9815fb38cf
@ -1146,6 +1146,9 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus,
|
||||
*/
|
||||
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
|
||||
* 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("");
|
||||
|
||||
if (network->agent_request) {
|
||||
error = dbus_error_busy(*message);
|
||||
goto reply_error;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is not a Known Network. If connection succeeds, either
|
||||
* network_sync_psk or network_connected will save this network
|
||||
|
Loading…
Reference in New Issue
Block a user