From 35c308f1ffb5424deb7e90508f95971ea69f39ca Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Fri, 17 Jul 2009 11:46:58 +0200 Subject: [PATCH] Keep Ethernet services around only for one second --- src/service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/service.c b/src/service.c index d1a99c8..d389107 100644 --- a/src/service.c +++ b/src/service.c @@ -810,17 +810,21 @@ void __connman_service_put(struct connman_service *service) iter = g_hash_table_lookup(service_hash, service->identifier); if (iter != NULL) { + guint interval = 1; + reply_pending(service, EIO); if (service->network != NULL) { connman_network_unref(service->network); service->network = NULL; + + interval = 5; } service->state = CONNMAN_SERVICE_STATE_FAILURE; service->error = CONNMAN_SERVICE_ERROR_OUT_OF_RANGE; - service->timeout = g_timeout_add_seconds(5, + service->timeout = g_timeout_add_seconds(interval, remove_timeout, iter); } else service_free(service); -- 2.7.4