diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2017-03-23 10:54:13 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2017-03-23 10:54:25 +0900 |
commit | 995b4c60b88150ed18511e77c0217afe65f3a76f (patch) | |
tree | 650e2a99f93bf341611b54eb83a9b62241e6b721 /src | |
parent | 199bca7e38232678c1c2ddbd3fc6a6b597bce6a7 (diff) | |
download | connman-995b4c60b88150ed18511e77c0217afe65f3a76f.tar.gz connman-995b4c60b88150ed18511e77c0217afe65f3a76f.tar.bz2 connman-995b4c60b88150ed18511e77c0217afe65f3a76f.zip |
Consider ipconfig method in clearing association state
Change-Id: I94f5a1f26140ea2c1edfdb1d9dd191435757802b
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/network.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c index 2585841c..eb7851ca 100755 --- a/src/network.c +++ b/src/network.c @@ -1307,8 +1307,35 @@ static gboolean __connman_network_clear_associating_delayed(gpointer user_data) if (network->associating == FALSE && state_ipv4 == CONNMAN_SERVICE_STATE_ASSOCIATION && - state_ipv6 == CONNMAN_SERVICE_STATE_ASSOCIATION) - connman_network_clear_associating(network); + state_ipv6 == CONNMAN_SERVICE_STATE_ASSOCIATION) { + __connman_service_ipconfig_indicate_state(service, + CONNMAN_SERVICE_STATE_IDLE, + CONNMAN_IPCONFIG_TYPE_IPV4); + __connman_service_ipconfig_indicate_state(service, + CONNMAN_SERVICE_STATE_IDLE, + CONNMAN_IPCONFIG_TYPE_IPV6); + } else { + if (network->associating == FALSE) { + struct connman_ipconfig *ipconfig_ipv4, *ipconfig_ipv6; + enum connman_ipconfig_method ipv4_method, ipv6_method; + + ipconfig_ipv4 = __connman_service_get_ip4config(service); + ipv4_method = __connman_ipconfig_get_method(ipconfig_ipv4); + ipconfig_ipv6 = __connman_service_get_ip4config(service); + ipv6_method = __connman_ipconfig_get_method(ipconfig_ipv6); + + if((ipv4_method == CONNMAN_IPCONFIG_METHOD_UNKNOWN || ipv4_method == CONNMAN_IPCONFIG_METHOD_OFF) && + (state_ipv6 == CONNMAN_SERVICE_STATE_ASSOCIATION)) + __connman_service_ipconfig_indicate_state(service, + CONNMAN_SERVICE_STATE_IDLE, + CONNMAN_IPCONFIG_TYPE_IPV6); + if((ipv6_method == CONNMAN_IPCONFIG_METHOD_UNKNOWN || ipv6_method == CONNMAN_IPCONFIG_METHOD_OFF) && + (state_ipv4 == CONNMAN_SERVICE_STATE_ASSOCIATION)) + __connman_service_ipconfig_indicate_state(service, + CONNMAN_SERVICE_STATE_IDLE, + CONNMAN_IPCONFIG_TYPE_IPV4); + } + } return FALSE; } |