[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[commits] r6206 - in /fsf/trunk/libc: ChangeLog elf/soinit.c resolv/res_query.c resolv/res_send.c



Author: eglibc
Date: Tue May 20 00:05:20 2008
New Revision: 6206

Log:
Import glibc-mainline for 2008-05-20

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/elf/soinit.c
    fsf/trunk/libc/resolv/res_query.c
    fsf/trunk/libc/resolv/res_send.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Tue May 20 00:05:20 2008
@@ -1,3 +1,16 @@
+2008-05-19  Jakub Jelinek  <jakub@xxxxxxxxxx>
+
+	* elf/soinit.c (__EH_FRAME_BEGIN__): Remove.
+
+2008-05-19  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* 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.
+
 2008-05-18  Ulrich Drepper  <drepper@xxxxxxxxxx>
 
 	* nscd/cache.c (cache_add): Take additional parameter specifying

Modified: fsf/trunk/libc/elf/soinit.c
==============================================================================
--- fsf/trunk/libc/elf/soinit.c (original)
+++ fsf/trunk/libc/elf/soinit.c Tue May 20 00:05:20 2008
@@ -20,10 +20,6 @@
     (**list) ();
 }
 
-static const char __EH_FRAME_BEGIN__[]
-  __attribute__ ((used, section (".eh_frame")))
-  = { };
-
 /* This function will be called from _init in init-first.c.  */
 void
 __libc_global_ctors (void)

Modified: fsf/trunk/libc/resolv/res_query.c
==============================================================================
--- fsf/trunk/libc/resolv/res_query.c (original)
+++ fsf/trunk/libc/resolv/res_query.c Tue May 20 00:05:20 2008
@@ -223,6 +223,21 @@
 	   is easy to verify that this is the same as ignoring all
 	   tests of HP2.  */
 	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
+
+	if (n < sizeof (HEADER) && nanswerp2 != NULL
+	    && *nanswerp2 > sizeof (HEADER))
+	  {
+	    /* Special case of partial answer.  */
+	    assert (hp != hp2);
+	    hp = hp2;
+	  }
+	else if (nanswerp2 != NULL
+		 && *nanswerp2 < sizeof (HEADER) && n > sizeof (HEADER))
+	  {
+	    /* Special case of partial answer.  */
+	    assert (hp != hp2);
+	    hp2 = hp;
+	  }
 
 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {

Modified: fsf/trunk/libc/resolv/res_send.c
==============================================================================
--- fsf/trunk/libc/resolv/res_send.c (original)
+++ fsf/trunk/libc/resolv/res_send.c Tue May 20 00:05:20 2008
@@ -975,6 +975,8 @@
 	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 @@
 	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);
 	}