diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-05-19 17:34:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-05-19 17:34:14 +0000 |
commit | 5908f779e76e24827c0c6f38f2b7a0f857333bcb (patch) | |
tree | fe2afd890ce08267486077d80eee52935e854c3d /resolv/res_send.c | |
parent | 528741cb6c7218e7f2f764fa10aa7e67699eadaa (diff) | |
download | glibc-5908f779e76e24827c0c6f38f2b7a0f857333bcb.tar.gz glibc-5908f779e76e24827c0c6f38f2b7a0f857333bcb.tar.xz glibc-5908f779e76e24827c0c6f38f2b7a0f857333bcb.zip |
* resolv/res_query.c (__libc_res_nquery): In case one of two
answer was too short don't try to read that answer's header. * resolv/res_send.c (send_dg): In case of timeout and there are two queries and one has been answered, return value indicating success.
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r-- | resolv/res_send.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c index b3dbd702a2..e67ef1c676 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -975,6 +975,8 @@ send_dg(res_state statp, int recvresp2 = buf2 == NULL; pfd[0].fd = EXT(statp).nssocks[ns]; pfd[0].events = POLLOUT; + if (resplen2 != NULL) + *resplen2 = 0; wait: if (need_recompute) { recompute_resend: @@ -1001,6 +1003,11 @@ send_dg(res_state statp, if (n == 0) { Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout sending\n")); + if (recvresp1) + return resplen; + if (buf2 != NULL && recvresp2) + return 1; + *gotsomewhere = 1; return (0); } |