]> sourceware.org Git - glibc.git/commitdiff
Revert "resolv_test.c: also cope with CONNREFUSED errors returned by recvfrom"
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 25 Sep 2017 18:47:51 +0000 (20:47 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 25 Sep 2017 18:47:51 +0000 (20:47 +0200)
This reverts commit 6174537c24cfe324d6e8f5a2a421883df12b8b6a.

ChangeLog
support/resolv_test.c

index 7bbc86482f40dd5438f6ec2eb529e4a25bd3f6fa..86cd508e3c31447ea0ed39ae5106a8f5455f51f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -82,8 +82,6 @@
        (CMSG_FIRSTHDR, __cmsg_nxthdr): Use (struct cmsghdr *) 0 instead of
        NULL.
        * bits/socket.h: Likewise.
-       * support/resolv_test.c (server_thread_udp_process_one): Call recvfrom
-       instead of xrecvfrom, and ignore ECONNREFUSED errors.
        * sysdeps/unix/clock_gettime.c (realtime_gettime, __clock_gettime): Use
        __gettimeofday instead of gettimeofday.
        * sysdeps/unix/clock_settime.c (__clock_settime): Use __settimeofday
index c3325b89b156910a54fcb30b83c5b33e2ea0bea9..1625dcf43a204434d395a6fbf8524d06c5f403fc 100644 (file)
@@ -600,7 +600,7 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index)
   unsigned char query[512];
   struct sockaddr_storage peer;
   socklen_t peerlen = sizeof (peer);
-  ssize_t length = recvfrom (obj->servers[server_index].socket_udp,
+  size_t length = xrecvfrom (obj->servers[server_index].socket_udp,
                              query, sizeof (query), 0,
                              (struct sockaddr *) &peer, &peerlen);
   /* Check for termination.  */
@@ -613,12 +613,6 @@ server_thread_udp_process_one (struct resolv_test *obj, int server_index)
       return false;
   }
 
-  if (length < 0)
-    {
-      /* The other end had closed the socket, and we are notified only now. */
-      TEST_VERIFY_EXIT (errno == ECONNREFUSED);
-      return true;
-    }
 
   struct query_info qinfo;
   parse_query (&qinfo, query, length);
This page took 0.075154 seconds and 5 git commands to generate.