projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56050f8
)
Check interval parameters and request first update
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 5 Jan 2010 15:13:34 +0000
(07:13 -0800)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 5 Jan 2010 15:13:34 +0000
(07:13 -0800)
src/counter.c
patch
|
blob
|
history
diff --git
a/src/counter.c
b/src/counter.c
index
31d463e
..
7c213b6
100644
(file)
--- a/
src/counter.c
+++ b/
src/counter.c
@@
-86,6
+86,9
@@
int __connman_counter_register(const char *owner, const char *path,
DBG("owner %s path %s interval %u", owner, path, interval);
+ if (interval < 1)
+ return -EINVAL;
+
counter = g_hash_table_lookup(counter_table, path);
if (counter != NULL)
return -EEXIST;
@@
-106,6
+109,8
@@
int __connman_counter_register(const char *owner, const char *path,
counter->watch = g_dbus_add_disconnect_watch(connection, owner,
owner_disconnect, counter, NULL);
+ __connman_rtnl_request_update();
+
return 0;
}