[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r10893: slightly smarter heuristic about when to use obsolete ::a.b. (in tor/trunk: . src/common)



Author: nickm
Date: 2007-07-20 14:30:47 -0400 (Fri, 20 Jul 2007)
New Revision: 10893

Modified:
   tor/trunk/
   tor/trunk/src/common/compat.c
Log:
 r13856@catbus:  nickm | 2007-07-20 14:30:44 -0400
 slightly smarter heuristic about when to use obsolete ::a.b.c.d format.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r13856] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2007-07-20 17:40:49 UTC (rev 10892)
+++ tor/trunk/src/common/compat.c	2007-07-20 18:30:47 UTC (rev 10893)
@@ -834,7 +834,7 @@
       words[i] = (((uint16_t)addr->s6_addr[2*i])<<8) + addr->s6_addr[2*i+1];
     }
     if (words[0] == 0 && words[1] == 0 && words[2] == 0 && words[3] == 0 &&
-        words[4] == 0 && ((words[5] == 0 && (words[6] || words[7])) ||
+        words[4] == 0 && ((words[5] == 0 && words[6] && words[7]) ||
                           (words[5] == 0xffff))) {
       /* This is an IPv4 address. */
       if (words[5] == 0) {