summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-resolve/test-resolve.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-05-15 16:34:38 +0200
committerLennart Poettering <lennart@poettering.net>2014-05-15 17:13:05 +0200
commit4a134c4903dbf6ef6c6ad55780643a5dd816d349 (patch)
treed63c6f38b198f1118b8c691864ff5d00f05a3297 /src/libsystemd/sd-resolve/test-resolve.c
parenta71fe8b8aee1cb78c4d8c56eeb234743f64e4b4d (diff)
sd-resolve: add "floating" resolve queries
Same story as for sd-bus and sd-event: allow passing NULL to store query in in which case the query is freed automatically.
Diffstat (limited to 'src/libsystemd/sd-resolve/test-resolve.c')
-rw-r--r--src/libsystemd/sd-resolve/test-resolve.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd/sd-resolve/test-resolve.c b/src/libsystemd/sd-resolve/test-resolve.c
index 3717286c44..c6c3bfb0ea 100644
--- a/src/libsystemd/sd-resolve/test-resolve.c
+++ b/src/libsystemd/sd-resolve/test-resolve.c
@@ -140,6 +140,9 @@ int main(int argc, char *argv[]) {
assert_se(sd_resolve_default(&resolve) >= 0);
+ /* Test a floating resolver query */
+ sd_resolve_getaddrinfo(resolve, NULL, "redhat.com", "http", NULL, getaddrinfo_handler, NULL);
+
/* Make a name -> address query */
r = sd_resolve_getaddrinfo(resolve, &q1, argc >= 2 ? argv[1] : "www.heise.de", NULL, &hints, getaddrinfo_handler, NULL);
if (r < 0)