summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org>2023-04-03 16:19:46 +0200
committerDaniel Wagner <wagi@monom.org>2023-04-11 09:38:45 +0200
commit20c42f4ccb5f618210c5af17fc36cf3ef4b16246 (patch)
tree45ff38c3bd0d92663a051045e275e46254a4344b
parent64ba5d457c77ebb65b0a23910d26089973fb6ce7 (diff)
downloadconnman-20c42f4ccb5f618210c5af17fc36cf3ef4b16246.tar.gz
timeserver: Purge timeserver list after reset
When reset, the timeserver list needs to be purged from whole timesever history, in order to only contain the up-to-date values.
-rw-r--r--src/timeserver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/timeserver.c b/src/timeserver.c
index 4c25d4b8..d23776fa 100644
--- a/src/timeserver.c
+++ b/src/timeserver.c
@@ -413,6 +413,9 @@ static void ts_reset(struct connman_service *service)
g_slist_free_full(timeservers_list, g_free);
+ g_slist_free_full(ts_list, g_free);
+ ts_list = NULL;
+
timeservers_list = __connman_timeserver_get_all(service);
__connman_service_timeserver_changed(service, timeservers_list);