summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2017-03-23 01:54:13 (GMT)
committerSeonah Moon <seonah1.moon@samsung.com>2017-03-23 01:54:25 (GMT)
commit995b4c60b88150ed18511e77c0217afe65f3a76f (patch)
tree650e2a99f93bf341611b54eb83a9b62241e6b721
parent199bca7e38232678c1c2ddbd3fc6a6b597bce6a7 (diff)
downloadconnman-995b4c60b88150ed18511e77c0217afe65f3a76f.zip
connman-995b4c60b88150ed18511e77c0217afe65f3a76f.tar.gz
connman-995b4c60b88150ed18511e77c0217afe65f3a76f.tar.bz2
Consider ipconfig method in clearing association staterefs/changes/22/120422/1
Change-Id: I94f5a1f26140ea2c1edfdb1d9dd191435757802b Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-xsrc/network.c31
1 files changed, 29 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 2585841..eb7851c 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;
}