void __connman_device_set_phyindex(struct connman_device *device,
int phyindex);
-void __connman_device_increase_connections(struct connman_device *device);
-void __connman_device_decrease_connections(struct connman_device *device);
-
void __connman_device_set_network(struct connman_device *device,
struct connman_network *network);
void __connman_device_cleanup_networks(struct connman_device *device);
char *devname;
int phyindex;
int index;
- unsigned int connections;
guint scan_timeout;
guint pending_timeout;
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;
device->disconnected = disconnected;
if (disconnected == TRUE)
+ {
force_scan_trigger(device);
+ device->backoff_interval = SCAN_INITIAL_DELAY;
+ }
return 0;
}
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
DBG("network %p", network);
- __connman_device_increase_connections(network->device);
-
__connman_device_set_network(network->device, network);
connman_device_set_disconnected(network->device, FALSE);
__connman_connection_gateway_activate(service,
CONNMAN_IPCONFIG_TYPE_IPV6);
- __connman_device_increase_connections(network->device);
-
__connman_device_set_network(network->device, network);
connman_device_set_disconnected(network->device, FALSE);
{
DBG("network %p", network);
- __connman_device_increase_connections(network->device);
-
__connman_device_set_network(network->device, network);
connman_device_set_disconnected(network->device, FALSE);
if (network->connected == connected)
return -EALREADY;
- if (connected == FALSE)
- __connman_device_decrease_connections(network->device);
-
network->connected = connected;
set_connected(network);