diff options
Diffstat (limited to 'src/timesync/timesyncd-conf.c')
-rw-r--r-- | src/timesync/timesyncd-conf.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/timesync/timesyncd-conf.c b/src/timesync/timesyncd-conf.c index 99bdb55e98..f394d0a2af 100644 --- a/src/timesync/timesyncd-conf.c +++ b/src/timesync/timesyncd-conf.c @@ -34,6 +34,9 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string) first = type == SERVER_FALLBACK ? m->fallback_servers : m->system_servers; + if (type == SERVER_FALLBACK) + m->have_fallbacks = true; + for (;;) { _cleanup_free_ char *word = NULL; bool found = false; @@ -63,6 +66,13 @@ int manager_parse_server_string(Manager *m, ServerType type, const char *string) return 0; } +int manager_parse_fallback_string(Manager *m, const char *string) { + if (m->have_fallbacks) + return 0; + + return manager_parse_server_string(m, SERVER_FALLBACK, string); +} + int config_parse_servers( const char *unit, const char *filename, |