From 0dafb0f80440a5d24b43b449bdecb5cd79b06242 Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Wed, 8 Dec 2010 16:37:12 -0800 Subject: network: Keep device->connections counter in sync Calling __connman_device_decrease_connections from set_connnected can decrease the connections counter twice on disconnect. --- src/device.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/device.c') 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; -- cgit v1.2.3