projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b08159e
)
service: Use helper function to add timeservers only once
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Mon, 30 Apr 2012 11:13:01 +0000
(14:13 +0300)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 1 May 2012 04:08:49 +0000
(06:08 +0200)
src/service.c
patch
|
blob
|
history
diff --git
a/src/service.c
b/src/service.c
index
a6bd606
..
018f12f
100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-2968,10
+2968,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);
}