* [PATCH] timeserver: Purge timeserver list after reset
@ 2023-04-03 15:02 VAUTRIN Emmanuel (Canal Plus Prestataire)
2023-04-11 7:39 ` Daniel Wagner
0 siblings, 1 reply; 2+ messages in thread
From: VAUTRIN Emmanuel (Canal Plus Prestataire) @ 2023-04-03 15:02 UTC (permalink / raw)
To: connman
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]
When reset, the timeserver list needs to be purged from whole
timesever history, in order to only contain the up-to-date values.
---
src/timeserver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/timeserver.c b/src/timeserver.c
index 4c25d4b85746..d23776faa96c 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);
--
2.25.1
Hello,
Please find the right formatted patch in attachment.
Emmanuel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-timeserver-Purge-timeserver-list-after-reset.patch --]
[-- Type: text/x-patch; name="0001-timeserver-Purge-timeserver-list-after-reset.patch", Size: 880 bytes --]
From 72d781d4060609a2057dce9183bab3f9230cdb8c Mon Sep 17 00:00:00 2001
From: Emmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org>
Date: Mon, 3 Apr 2023 16:19:46 +0200
Subject: [PATCH] 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.
---
src/timeserver.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/timeserver.c b/src/timeserver.c
index 4c25d4b85746..d23776faa96c 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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] timeserver: Purge timeserver list after reset
2023-04-03 15:02 [PATCH] timeserver: Purge timeserver list after reset VAUTRIN Emmanuel (Canal Plus Prestataire)
@ 2023-04-11 7:39 ` Daniel Wagner
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Wagner @ 2023-04-11 7:39 UTC (permalink / raw)
To: VAUTRIN Emmanuel (Canal Plus Prestataire); +Cc: connman
On Mon, Apr 03, 2023 at 03:02:18PM +0000, VAUTRIN Emmanuel (Canal Plus Prestataire) wrote:
> When reset, the timeserver list needs to be purged from whole
> timesever history, in order to only contain the up-to-date values.
Patch applied.
Thanks,
Daniel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-04-11 7:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 15:02 [PATCH] timeserver: Purge timeserver list after reset VAUTRIN Emmanuel (Canal Plus Prestataire)
2023-04-11 7:39 ` Daniel Wagner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).