]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-dns-rr.h
resolved: optionally, allocate DnsResourceKey objects on the stack
authorLennart Poettering <lennart@poettering.net>
Thu, 3 Dec 2015 16:27:13 +0000 (17:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 3 Dec 2015 20:17:49 +0000 (21:17 +0100)
commit1b4f6e79ec51a57003896a0b605fba427b4a98d2
tree88f95d5b8e9db07c62bfef5c8d789a1b6659d824
parent2a44bec4f62833222a85ad8c90054468dfa75013
resolved: optionally, allocate DnsResourceKey objects on the stack

Sometimes when looking up entries in hashmaps indexed by a
DnsResourceKey it is helpful not having to allocate a full
DnsResourceKey dynamically just to use it as search key. Instead,
optionally allow allocation of a DnsResourceKey on the stack. Resource
keys allocated like that of course are subject to other lifetime cycles
than the usual Resource keys, hence initialize the reference counter to
to (unsigned) -1.

While we are at it, remove the prototype for
dns_resource_key_new_dname() which was never implemented.
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-rr.h
src/resolve/resolved-dns-zone.c