summaryrefslogtreecommitdiff
path: root/src/stats.c
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-10-11 13:58:02 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-10-11 21:08:19 +0200
commitea5b1fb70fa718bd68b63de75f12881fab9f9c21 (patch)
tree2975cc0b2a09e4c7c18119d602a4c0abd860cf42 /src/stats.c
parent05becd265667dd8b48c220f6bb1a936ffc0afeb1 (diff)
downloadconnman-ea5b1fb70fa718bd68b63de75f12881fab9f9c21.tar.gz
connman-ea5b1fb70fa718bd68b63de75f12881fab9f9c21.tar.bz2
connman-ea5b1fb70fa718bd68b63de75f12881fab9f9c21.zip
Open stats file late and close them early
Instead of opening stats file when a service is created, defer it to the point where either __connman_ipconfig_enable or __connman_ipconfig_disable is called.
Diffstat (limited to 'src/stats.c')
-rw-r--r--src/stats.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stats.c b/src/stats.c
index f646bac9..0ad8ae22 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -349,6 +349,8 @@ int __connman_stats_service_register(struct connman_service *service)
return err;
handle = g_hash_table_lookup(stats_hash, service);
+ } else {
+ return -EALREADY;
}
err = stats_open(service, handle);