summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2010-12-08 16:37:12 -0800
committerSamuel Ortiz <sameo@linux.intel.com>2010-12-13 13:11:34 +0100
commit0dafb0f80440a5d24b43b449bdecb5cd79b06242 (patch)
tree76221e08f7aed931e234e0ac7b8dd042c57bee0d /src/device.c
parent272115f5e3b52bf136303d81d6b3728b0261e402 (diff)
downloadconnman-0dafb0f80440a5d24b43b449bdecb5cd79b06242.tar.gz
connman-0dafb0f80440a5d24b43b449bdecb5cd79b06242.tar.bz2
connman-0dafb0f80440a5d24b43b449bdecb5cd79b06242.zip
network: Keep device->connections counter in sync
Calling __connman_device_decrease_connections from set_connnected can decrease the connections counter twice on disconnect.
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index b8110c47..f2b8cf29 100644
--- a/src/device.c
+++ b/src/device.c
@@ -250,6 +250,8 @@ int __connman_device_disable(struct connman_device *device)
return err;
}
+ device->connections = 0;
+
device->powered_pending = FALSE;
device->powered = FALSE;