From ef3294d0c9c7841992d594772c4c60948efef731 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 7 Jul 2009 21:14:00 -0700 Subject: [PATCH] Don't trigger auto-connect if user initiated connect failed --- src/service.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index d511618..56e4612 100644 --- a/src/service.c +++ b/src/service.c @@ -471,6 +471,7 @@ static void __connman_service_auto_connect(void) static gboolean connect_timeout(gpointer user_data) { struct connman_service *service = user_data; + connman_bool_t auto_connect = FALSE; DBG("service %p", service); @@ -509,12 +510,14 @@ static gboolean connect_timeout(gpointer user_data) dbus_message_unref(service->pending); service->pending = NULL; - } + } else + auto_connect = TRUE; __connman_service_indicate_state(service, CONNMAN_SERVICE_STATE_FAILURE); - __connman_service_auto_connect(); + if (auto_connect == TRUE) + __connman_service_auto_connect(); return FALSE; } -- 2.7.4