diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:09:11 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-07 09:09:11 +0100 |
commit | cca49d38b4ec29a42821697a8c6b4c3e953c11f3 (patch) | |
tree | 855a81af51d0f237176c86987fbd51d3fc04b737 | |
parent | 617220b9b366637aa0377e20cd0b4929988fedeb (diff) | |
download | connman-cca49d38b4ec29a42821697a8c6b4c3e953c11f3.tar.gz connman-cca49d38b4ec29a42821697a8c6b4c3e953c11f3.tar.bz2 connman-cca49d38b4ec29a42821697a8c6b4c3e953c11f3.zip |
Remove unused secondary feature of devices and networks
-rw-r--r-- | include/device.h | 3 | ||||
-rw-r--r-- | src/device.c | 32 | ||||
-rw-r--r-- | src/network.c | 14 |
3 files changed, 5 insertions, 44 deletions
diff --git a/include/device.h b/include/device.h index 44744486..29949e80 100644 --- a/include/device.h +++ b/include/device.h @@ -76,9 +76,6 @@ void connman_device_set_ident(struct connman_device *device, void connman_device_set_mode(struct connman_device *device, enum connman_device_mode mode); enum connman_device_mode connman_device_get_mode(struct connman_device *device); -void connman_device_set_secondary(struct connman_device *device, - connman_bool_t secondary); -connman_bool_t connman_device_get_secondary(struct connman_device *device); int connman_device_set_powered(struct connman_device *device, connman_bool_t powered); diff --git a/src/device.c b/src/device.c index 3959ac98..fde5fd6d 100644 --- a/src/device.c +++ b/src/device.c @@ -36,7 +36,6 @@ struct connman_device { struct connman_element element; enum connman_device_type type; enum connman_device_mode mode; - connman_bool_t secondary; connman_bool_t offlinemode; connman_bool_t blocked; connman_bool_t powered; @@ -811,10 +810,9 @@ struct connman_device *connman_device_create(const char *node, device->element.ipv4.method = CONNMAN_IPCONFIG_METHOD_DHCP; - device->type = type; - device->name = g_strdup(type2description(device->type)); - device->mode = CONNMAN_DEVICE_MODE_UNKNOWN; - device->secondary = FALSE; + device->type = type; + device->name = g_strdup(type2description(device->type)); + device->mode = CONNMAN_DEVICE_MODE_UNKNOWN; device->powered_persistent = TRUE; @@ -1025,30 +1023,6 @@ enum connman_device_mode connman_device_get_mode(struct connman_device *device) } /** - * connman_device_set_secondary: - * @device: device structure - * @secondary: secondary value - * - * Change secondary value of device - */ -void connman_device_set_secondary(struct connman_device *device, - connman_bool_t secondary) -{ - device->secondary = secondary; -} - -/** - * connman_device_get_secondary: - * @device: device structure - * - * Get secondary value of device - */ -connman_bool_t connman_device_get_secondary(struct connman_device *device) -{ - return device->secondary; -} - -/** * connman_device_set_powered: * @device: device structure * @powered: powered state diff --git a/src/network.c b/src/network.c index c3f4a8d4..cfde5516 100644 --- a/src/network.c +++ b/src/network.c @@ -36,7 +36,6 @@ struct connman_network { struct connman_element element; enum connman_network_type type; enum connman_network_protocol protocol; - connman_bool_t secondary; connman_bool_t available; connman_bool_t connected; connman_bool_t roaming; @@ -380,7 +379,6 @@ struct connman_network *connman_network_create(const char *identifier, connman_element_set_uint8(&network->element, "Strength", strength); network->type = type; - network->secondary = FALSE; network->identifier = g_strdup(temp); return network; @@ -495,9 +493,6 @@ void connman_network_set_protocol(struct connman_network *network, void connman_network_set_group(struct connman_network *network, const char *group) { - if (network->secondary == TRUE) - return; - switch (network->type) { case CONNMAN_NETWORK_TYPE_UNKNOWN: case CONNMAN_NETWORK_TYPE_VENDOR: @@ -552,9 +547,6 @@ const char *__connman_network_get_ident(struct connman_network *network) connman_bool_t __connman_network_get_weakness(struct connman_network *network) { - if (network->secondary == TRUE) - return FALSE; - switch (network->type) { case CONNMAN_NETWORK_TYPE_UNKNOWN: case CONNMAN_NETWORK_TYPE_VENDOR: @@ -1282,8 +1274,6 @@ static int network_probe(struct connman_element *element) return err; } - network->secondary = connman_device_get_secondary(network->device); - switch (network->type) { case CONNMAN_NETWORK_TYPE_UNKNOWN: case CONNMAN_NETWORK_TYPE_VENDOR: @@ -1296,7 +1286,7 @@ static int network_probe(struct connman_element *element) case CONNMAN_NETWORK_TYPE_HSO: case CONNMAN_NETWORK_TYPE_WIFI: case CONNMAN_NETWORK_TYPE_WIMAX: - if (network->group != NULL && network->secondary == FALSE) + if (network->group != NULL) __connman_profile_add_network(network); break; } @@ -1328,7 +1318,7 @@ static void network_remove(struct connman_element *element) case CONNMAN_NETWORK_TYPE_HSO: case CONNMAN_NETWORK_TYPE_WIFI: case CONNMAN_NETWORK_TYPE_WIMAX: - if (network->group != NULL && network->secondary == FALSE) { + if (network->group != NULL) { __connman_profile_remove_network(network); g_free(network->group); |