From: Daniel Wagner Date: Tue, 15 Nov 2011 16:49:01 +0000 (+0100) Subject: network: Call indicate error function in error case X-Git-Tag: 0.78~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2425856d9b2f3d23b35fa4bcf06e1f1f2986365;p=platform%2Fupstream%2Fconnman.git network: Call indicate error function in error case Setting the error only on one ipconfig type e.g. IPv4 is not enough. service.c:combine_state() will report to stay in associating state: src/service.c:service_indicate_state() service 0x6b1a60 old association - new failure/association => association After applying the patch it loosk like this: src/service.c:service_indicate_state() service 0x6b1f70 old association - new failure/association => association src/service.c:service_indicate_state() service 0x6b1f70 old association - new failure/failure => failure --- diff --git a/src/network.c b/src/network.c index f9dfada..058495d 100644 --- a/src/network.c +++ b/src/network.c @@ -655,9 +655,8 @@ static void set_associate_error(struct connman_network *network) service = __connman_service_lookup_from_network(network); - __connman_service_ipconfig_indicate_state(service, - CONNMAN_SERVICE_STATE_FAILURE, - CONNMAN_IPCONFIG_TYPE_IPV4); + __connman_service_indicate_error(service, + CONNMAN_SERVICE_ERROR_CONNECT_FAILED); } static void set_configure_error(struct connman_network *network) @@ -666,9 +665,8 @@ static void set_configure_error(struct connman_network *network) service = __connman_service_lookup_from_network(network); - __connman_service_ipconfig_indicate_state(service, - CONNMAN_SERVICE_STATE_FAILURE, - CONNMAN_IPCONFIG_TYPE_IPV4); + __connman_service_indicate_error(service, + CONNMAN_SERVICE_ERROR_CONNECT_FAILED); } static void set_invalid_key_error(struct connman_network *network)