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);
}
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();