diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2013-01-16 12:57:14 +0200 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-01-16 16:53:14 +0200 |
commit | a07312e3a052f409e4457e26b258119ef4084368 (patch) | |
tree | ec68efd8261198ddb63638f335cca51a5dfb6227 /src | |
parent | 13125bd133bf8c31700c16a6deb1a529077675d7 (diff) | |
download | connman-a07312e3a052f409e4457e26b258119ef4084368.tar.gz connman-a07312e3a052f409e4457e26b258119ef4084368.tar.bz2 connman-a07312e3a052f409e4457e26b258119ef4084368.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network.c b/src/network.c index ac4608bd..bef6e0d9 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: |