diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-08-06 01:02:06 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-08-06 01:02:06 +0000 |
commit | 26a4d2b3d1bbe6eeb5e95ce3a0900e31b89e42ce (patch) | |
tree | 1dcc82f732bbad2b332a221208b01c3653478085 /libasyncns/asyncns-test.c | |
parent | 2932bd287383151f9e469d90c6de2bcee6276175 (diff) |
some minor updates
git-svn-id: file:///home/lennart/svn/public/libasyncns/trunk@22 cc0fb855-19ed-0310-866e-8c1d96e4abae
Diffstat (limited to 'libasyncns/asyncns-test.c')
-rw-r--r-- | libasyncns/asyncns-test.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libasyncns/asyncns-test.c b/libasyncns/asyncns-test.c index e3169ec..a6e2d72 100644 --- a/libasyncns/asyncns-test.c +++ b/libasyncns/asyncns-test.c @@ -41,16 +41,13 @@ int main(int argc, char *argv[]) { } /* Make a name -> address query */ - memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; q1 = asyncns_getaddrinfo(asyncns, argc >= 2 ? argv[1] : "www.heise.de", NULL, &hints); - /* Make an address -> name query */ - memset(&sa, 0, sizeof(sa)); sa.sin_family = AF_INET; sa.sin_addr.s_addr = inet_addr(argc >= 3 ? argv[2] : "193.99.144.71"); @@ -58,9 +55,7 @@ int main(int argc, char *argv[]) { q2 = asyncns_getnameinfo(asyncns, (struct sockaddr*) &sa, sizeof(sa), 0, 1, 1); - /* Wait until the two queries are completed */ - while (!asyncns_isdone(asyncns, q1) || !asyncns_isdone(asyncns, q2)) { if (asyncns_wait(asyncns, 1) < 0) goto fail; |