summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-07-29 21:46:12 +0200
committerLennart Poettering <lennart@poettering.net>2014-07-29 23:53:08 +0200
commit2f82f5eae471a23a7aa9f40f19079a4b63e19496 (patch)
treee4c528cb84769aab6e641dc8d6ffdc926945a87e /src
parent70b34f5de86809991d6753ba486b88481ceab817 (diff)
resolved: we don't need the DNS server "source" concept anymore, remove it
Diffstat (limited to 'src')
-rw-r--r--src/resolve/resolved-dns-server.c9
-rw-r--r--src/resolve/resolved-dns-server.h8
2 files changed, 2 insertions, 15 deletions
diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c
index f33cf5d961..2be81ff1d8 100644
--- a/src/resolve/resolved-dns-server.c
+++ b/src/resolve/resolved-dns-server.c
@@ -44,11 +44,9 @@ int dns_server_new(
LIST_FIND_TAIL(servers, l->dns_servers, tail);
LIST_INSERT_AFTER(servers, l->dns_servers, tail, s);
s->link = l;
- s->source = DNS_SERVER_LINK;
} else {
LIST_FIND_TAIL(servers, m->dns_servers, tail);
LIST_INSERT_AFTER(servers, m->dns_servers, tail, s);
- s->source = DNS_SERVER_SYSTEM;
}
s->manager = m;
@@ -63,13 +61,10 @@ DnsServer* dns_server_free(DnsServer *s) {
if (!s)
return NULL;
- if (s->source == DNS_SERVER_LINK) {
-
+ if (s->manager) {
if (s->link)
LIST_REMOVE(servers, s->link->dns_servers, s);
- } else if (s->source == DNS_SERVER_SYSTEM) {
-
- if (s->manager)
+ else
LIST_REMOVE(servers, s->manager->dns_servers, s);
}
diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h
index 2736032ea6..574616ef0f 100644
--- a/src/resolve/resolved-dns-server.h
+++ b/src/resolve/resolved-dns-server.h
@@ -30,16 +30,8 @@ typedef enum DnsServerSource DnsServerSource;
#include "resolved-link.h"
#include "resolved-dns-server.h"
-enum DnsServerSource {
- DNS_SERVER_ANY,
- DNS_SERVER_SYSTEM,
- DNS_SERVER_LINK,
- _DNS_SERVER_SOURCE_MAX
-};
-
struct DnsServer {
Manager *manager;
- DnsServerSource source;
Link *link;