summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-server.h
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-06-24 18:41:46 +0200
committerTom Gundersen <teg@jklm.no>2015-07-14 12:03:04 +0200
commit91b14d6ff362b938a72db17b095ee9903d07381b (patch)
treeac16392fcde03fa1732b80e82c5ad2359f22d1d6 /src/resolve/resolved-dns-server.h
parenta0166609f782da91710dea9183d1bf138538db37 (diff)
resolved: reference count the dns servers
We want to reference the servers from their active transactions, so make sure they stay around as long as the transaction does.
Diffstat (limited to 'src/resolve/resolved-dns-server.h')
-rw-r--r--src/resolve/resolved-dns-server.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-server.h b/src/resolve/resolved-dns-server.h
index 70ff35b08f..03013beb82 100644
--- a/src/resolve/resolved-dns-server.h
+++ b/src/resolve/resolved-dns-server.h
@@ -37,6 +37,8 @@ typedef enum DnsServerType {
struct DnsServer {
Manager *manager;
+ unsigned n_ref;
+
DnsServerType type;
Link *link;
@@ -57,6 +59,7 @@ int dns_server_new(
int family,
const union in_addr_union *address);
-DnsServer* dns_server_free(DnsServer *s);
+DnsServer* dns_server_ref(DnsServer *s);
+DnsServer* dns_server_unref(DnsServer *s);
extern const struct hash_ops dns_server_hash_ops;