summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-conf.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-24 21:27:29 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 21:58:38 +0100
commit4b95f1798f22c1bb75295f448188560cb6ec9ece (patch)
treea558209fdb4450717d3d28c4987140ed4f5b33b8 /src/resolve/resolved-conf.c
parenta51c10485af349eb15faa4d1a63b9818bcf3e589 (diff)
resolved: unify DnsServer handling code between Link and Manager
This copies concepts we introduced for the DnsSearchDomain stuff, and reworks the operations on lists of dns servers to be reusable and generic for use both with the Link and the Manager object.
Diffstat (limited to 'src/resolve/resolved-conf.c')
-rw-r--r--src/resolve/resolved-conf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c
index dbac45170f..3fc7d9ae3d 100644
--- a/src/resolve/resolved-conf.c
+++ b/src/resolve/resolved-conf.c
@@ -40,7 +40,7 @@ int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char
return r;
/* Filter out duplicates */
- s = manager_find_dns_server(m, type, family, &address);
+ s = dns_server_find(manager_get_first_dns_server(m, type), family, &address);
if (s) {
/*
* Drop the marker. This is used to find the servers
@@ -141,7 +141,7 @@ int config_parse_dns_servers(
if (isempty(rvalue))
/* Empty assignment means clear the list */
- manager_flush_dns_servers(m, ltype);
+ dns_server_unlink_all(manager_get_first_dns_server(m, ltype));
else {
/* Otherwise, add to the list */
r = manager_parse_dns_server_string_and_warn(m, ltype, rvalue);