[connman] Notify the IPv4 Ready State signal to UI followed by IPv6 Signal. 90/72290/3 accepted/tizen/common/20160608.160928 accepted/tizen/ivi/20160609.090754 accepted/tizen/mobile/20160609.090615 accepted/tizen/tv/20160609.090732 accepted/tizen/wearable/20160609.090715 submit/tizen/20160608.101452
authorNiraj Kumar Goit <niraj.g@samsung.com>
Tue, 31 May 2016 15:17:24 +0000 (20:47 +0530)
committerNiraj Kumar Goit <niraj.g@samsung.com>
Wed, 8 Jun 2016 06:48:28 +0000 (23:48 -0700)
Description: First ready state was notified when IP Address was obtained
    using IPv6 and at that time IPv4 Addresses were not available.
    and Application called to check gateway address before IPv4 Addresses
    were available so CAPI returned with error NO_CONNECTION.
    So sent a ready signal again after IPv4 address available.

Change-Id: If7ac89e8de920f144ea5d11fba65370622ce1572
Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
src/service.c

index 9f197dd..5dab82c 100755 (executable)
@@ -6846,6 +6846,19 @@ int __connman_service_ipconfig_indicate_state(struct connman_service *service,
                        is_connected_state(service, new_state))
                nameserver_add_all(service);
 
+#if defined TIZEN_EXT
+       int ret = service_indicate_state(service);
+       /*Sent the Ready changed signal again in case IPv4 IP set
+         after IPv6 IP set*/
+
+       if(ret == -EALREADY && type == CONNMAN_IPCONFIG_TYPE_IPV4
+                       && new_state == CONNMAN_SERVICE_STATE_READY) {
+               DBG("Notify IPv4 state new/old %d/%d", new_state,old_state);
+               state_changed(service);
+       }
+
+       return ret;
+#endif
        return service_indicate_state(service);
 }