From a07312e3a052f409e4457e26b258119ef4084368 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Wed, 16 Jan 2013 12:57:14 +0200 Subject: [PATCH] network: Do not report any error when removing a connecting network When connecting a network, if it's related technology is disabled, this network will raise an error through the agent. Leading to a possible retry request from the user, then to a crash if the user does so. Thus, we prevent any error to be raised in such situation and silently disconnect the connecting network instead. --- src/network.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network.c b/src/network.c index ac4608b..bef6e0d 100644 --- a/src/network.c +++ b/src/network.c @@ -805,7 +805,8 @@ static void network_remove(struct connman_network *network) if (network->driver == NULL) return; - connman_network_set_connected(network, FALSE); + if (network->connected == TRUE) + set_disconnected(network); switch (network->type) { case CONNMAN_NETWORK_TYPE_UNKNOWN: -- 2.7.4