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:
afd3667
)
clock: Use helper function to add timeservers only once
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 30 Apr 2012 11:13:00 +0000
(14:13 +0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 1 May 2012 04:08:49 +0000
(06:08 +0200)
src/clock.c
patch
|
blob
|
history
diff --git
a/src/clock.c
b/src/clock.c
index
f92a3be
..
a742557
100644
(file)
--- a/
src/clock.c
+++ b/
src/clock.c
@@
-271,11
+271,15
@@
static DBusMessage *set_property(DBusConnection *conn,
while (dbus_message_iter_get_arg_type(&entry) == DBUS_TYPE_STRING) {
const char *val;
+ GSList *new_head;
dbus_message_iter_get_basic(&entry, &val);
- list = g_slist_prepend(list, strdup(val));
- count++;
+ new_head = __connman_timeserver_add_list(list, val);
+ if (list != new_head) {
+ count++;
+ list = new_head;
+ }
dbus_message_iter_next(&entry);
}