From 5478034eb70040fde8110703bd076708b57fe52a Mon Sep 17 00:00:00 2001 From: Tim Kourt Date: Tue, 23 Jul 2019 18:12:58 -0700 Subject: [PATCH] network: Check for already connected network Check if the requested network is already connected, if so return success. --- src/network.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/network.c b/src/network.c index c3da4115..46205b97 100644 --- a/src/network.c +++ b/src/network.c @@ -1176,6 +1176,12 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus, l_debug(""); + if (network == station_get_connected_network(station)) + /* + * The requested network is already connected, return success. + */ + return l_dbus_message_new_method_return(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