Tizen: Fix reply pending bug 73/5073/1
authorArron Wang <arron.wang@intel.com>
Mon, 15 Oct 2012 02:56:00 +0000 (10:56 +0800)
committerZhang zhengguang <zhengguang.zhang@intel.com>
Mon, 1 Jul 2013 03:05:12 +0000 (11:05 +0800)
src/service.c

index 24e9562..893b4fc 100644 (file)
@@ -5186,7 +5186,16 @@ static int service_indicate_state(struct connman_service *service)
 
        if (new_state == CONNMAN_SERVICE_STATE_IDLE &&
                        old_state != CONNMAN_SERVICE_STATE_DISCONNECT) {
+#if !defined TIZEN_EXT
+               /*
+                * Description: 'service->pending' should be cleared whenever
+                * connection is finished regardless success or failure.
+                * If the service is disconnected in configuration state by
+                * dhcp failure or by the other part of connman, new state is
+                * 'idle' but old state is 'disconnect'. So it's not cleared.
+                */
                reply_pending(service, ECONNABORTED);
+#endif
 
                __connman_service_disconnect(service);
        }
@@ -5208,6 +5217,9 @@ static int service_indicate_state(struct connman_service *service)
        if (new_state == CONNMAN_SERVICE_STATE_IDLE) {
                connman_bool_t reconnect;
 
+#if defined TIZEN_EXT
+               reply_pending(service, ECONNABORTED);
+#endif
                reconnect = get_reconnect_state(service);
                if (reconnect == TRUE)
                        __connman_service_auto_connect();