summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-07-08 11:11:11 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-07-08 14:56:00 +0200
commit262e526fe8029ea65e9c0655b5d7a0e6438a8bb8 (patch)
tree0245d727bcd0154c13e2aa7d6b86a15b111659ea /src
parent529a011eb3ce7558f66ff22de36755f34cea3c8b (diff)
downloadconnman-262e526fe8029ea65e9c0655b5d7a0e6438a8bb8.tar.gz
connman-262e526fe8029ea65e9c0655b5d7a0e6438a8bb8.tar.bz2
connman-262e526fe8029ea65e9c0655b5d7a0e6438a8bb8.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/service.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c
index c2c2bc3a..3027cc8b 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) {