From: Marcel Holtmann Date: Fri, 15 May 2009 03:25:29 +0000 (-0700) Subject: Treat connection timeout the same as failures X-Git-Tag: 0.19~11 X-Git-Url: http://git.maemo.org/git/?p=connman;a=commitdiff_plain;h=4ae1c739633103ecd9dbdd1b427798255bc08fc0 Treat connection timeout the same as failures --- diff --git a/src/service.c b/src/service.c index 05e0be8..c735a39 100644 --- a/src/service.c +++ b/src/service.c @@ -301,6 +301,9 @@ static gboolean connect_timeout(gpointer user_data) dbus_message_unref(service->pending); service->pending = NULL; + + __connman_service_indicate_state(service, + CONNMAN_SERVICE_STATE_FAILURE); } return FALSE; @@ -704,7 +707,6 @@ int __connman_service_indicate_state(struct connman_service *service, dbus_message_unref(service->pending); service->pending = NULL; } - } if (state == CONNMAN_SERVICE_STATE_FAILURE) { @@ -721,6 +723,9 @@ int __connman_service_indicate_state(struct connman_service *service, dbus_message_unref(service->pending); service->pending = NULL; } + + service->state = CONNMAN_SERVICE_STATE_IDLE; + state_changed(service); } return 0;