]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/resolve/resolved-dns-rr.c
Use provided buffer in dns_resource_key_to_string
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 14 Feb 2016 23:51:55 +0000 (18:51 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 17 Feb 2016 00:55:51 +0000 (19:55 -0500)
commit202b76ae1ae1a63f4fe92053ffbda8435f8b6b7e
treee0ed34ba889168eb5bc37c54d2245cb12dac1e21
parent1c02e7ba55e3dbb56ab20b329318b5fd5c2eb8f0
Use provided buffer in dns_resource_key_to_string

When the buffer is allocated on the stack we do not have to check for
failure everywhere. This is especially useful in debug statements, because
we can put dns_resource_key_to_string() call in the debug statement, and
we do not need a seperate if (log_level >= LOG_DEBUG) for the conversion.

dns_resource_key_to_string() is changed not to provide any whitespace
padding. Most callers were stripping the whitespace with strstrip(),
and it did not look to well anyway. systemd-resolve output is not column
aligned anymore.

The result of the conversion is not stored in DnsTransaction object
anymore. It is used only for debugging, so it seems fine to generate it
when needed.

Various debug statements are extended to provide more information.
src/basic/af-list.h
src/resolve/dns-type.h
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-query.c
src/resolve/resolved-dns-rr.c
src/resolve/resolved-dns-rr.h
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-dns-transaction.h
src/resolve/resolved-manager.c