From 262e526fe8029ea65e9c0655b5d7a0e6438a8bb8 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Thu, 8 Jul 2010 11:11:11 +0200 Subject: [PATCH] Save counter values during shutdown With moving the start/stop function to the lower_up/lower_down fucntions in service, the statistic was not stored anymore when connman was shutdown. Reason being that lower_down will be called only from a RTNL event which is asynchron. So when the ethernet_disable is called connman doesn't see the corresponding UP,LOWER_UP event. --- src/service.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/service.c b/src/service.c index c2c2bc3..3027cc8 100644 --- a/src/service.c +++ b/src/service.c @@ -1673,6 +1673,9 @@ static void service_free(gpointer user_data) g_hash_table_remove(service_hash, service->identifier); + __connman_service_stats_stop(service); + __connman_storage_save_service(service); + service->path = NULL; if (path != NULL) { -- 2.7.4