summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Smith <ryan.smith@density.io>2022-04-18 13:40:38 -0600
committerDaniel Wagner <wagi@monom.org>2022-05-16 08:49:46 +0200
commit28278889f0bc28845c3166d96514c486d9701ff7 (patch)
treeae8452a772af119d8ebe20037be0acd095d9e59c
parent4388028c4179362e2f409e6ab90d53975527cafe (diff)
downloadconnman-28278889f0bc28845c3166d96514c486d9701ff7.tar.gz
clock: fix time update transition auto->manual
When the TimeUpdates property is changed via D-Bus from auto to manual, the change is written out to the settings state file. However, it does no modify the current service. This causes the service to continue to synchronize time even after TimeUpdates being set to manual. This patch updates the service whenever any change is made to the TimeUpdates setting.
-rw-r--r--src/clock.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/clock.c b/src/clock.c
index 906538ac..54ac274a 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -270,6 +270,7 @@ static DBusMessage *set_property(DBusConnection *conn,
} else if (g_str_equal(name, "TimeUpdates")) {
const char *strval;
enum time_updates newval;
+ struct connman_service *service;
if (type != DBUS_TYPE_STRING)
return __connman_error_invalid_arguments(msg);
@@ -290,12 +291,8 @@ static DBusMessage *set_property(DBusConnection *conn,
CONNMAN_CLOCK_INTERFACE, "TimeUpdates",
DBUS_TYPE_STRING, &strval);
- if (newval == TIME_UPDATES_AUTO) {
- struct connman_service *service;
-
- service = connman_service_get_default();
- __connman_timeserver_conf_update(service);
- }
+ service = connman_service_get_default();
+ __connman_timeserver_conf_update(service);
} else if (g_str_equal(name, "Timezone")) {
const char *strval;