summaryrefslogtreecommitdiff
path: root/src/device.c
diff options
context:
space:
mode:
authorDanny Jeongseok Seo <s.seo@samsung.com>2011-10-06 12:59:29 +0900
committerSamuel Ortiz <sameo@linux.intel.com>2011-10-06 11:48:00 +0200
commitc67a5b33c9dfb1fc761b8b33b725353bcd78fe4b (patch)
treed5bc795ffc8f4c93ae971c03601e7da73541b56b /src/device.c
parent3f706d0c8eeaebd9eb8aeae0ad8e923b93cb102a (diff)
downloadconnman-c67a5b33c9dfb1fc761b8b33b725353bcd78fe4b.tar.gz
connman-c67a5b33c9dfb1fc761b8b33b725353bcd78fe4b.tar.bz2
connman-c67a5b33c9dfb1fc761b8b33b725353bcd78fe4b.zip
device: Remove connections counter
The device connection counter is only used by the post scan auto connection logic, and the connection status is handled by the autoconnection service routine itself (__connman_service_auto_connect()).
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/src/device.c b/src/device.c
index b830688b..de7b141e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -58,7 +58,6 @@ struct connman_device {
char *devname;
int phyindex;
int index;
- unsigned int connections;
guint scan_timeout;
guint pending_timeout;
@@ -678,10 +677,8 @@ int connman_device_set_powered(struct connman_device *device,
else
__connman_technology_disabled(type);
- if (powered == FALSE) {
- device->connections = 0;
+ if (powered == FALSE)
return 0;
- }
connman_device_set_disconnected(device, FALSE);
device->scanning = FALSE;
@@ -852,7 +849,10 @@ int connman_device_set_disconnected(struct connman_device *device,
device->disconnected = disconnected;
if (disconnected == TRUE)
+ {
force_scan_trigger(device);
+ device->backoff_interval = SCAN_INITIAL_DELAY;
+ }
return 0;
}
@@ -926,25 +926,6 @@ const char *connman_device_get_string(struct connman_device *device,
return NULL;
}
-void __connman_device_increase_connections(struct connman_device *device)
-{
- if (device == NULL)
- return;
-
- device->connections++;
-}
-
-void __connman_device_decrease_connections(struct connman_device *device)
-{
- if (device == NULL)
- return;
-
- device->connections--;
-
- if (device->connections == 0)
- device->backoff_interval = SCAN_INITIAL_DELAY;
-}
-
/**
* connman_device_add_network:
* @device: device structure