(send_dg): In case of timeout and there are two queries and one has
authordrepper <drepper>
Mon, 19 May 2008 17:31:04 +0000 (17:31 +0000)
committerdrepper <drepper>
Mon, 19 May 2008 17:31:04 +0000 (17:31 +0000)
been answered, return value indicating success.

resolv/res_send.c

index b3dbd70..e67ef1c 100644 (file)
@@ -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);
        }