Author: dsilvers
Date: Thu Feb 22 11:48:39 2007
New Revision: 3186
URL:
http://svn.semichrome.net?rev=3186&view=rev
Log:
Fix RING_FINDBYHOST to actually find things. jmb found the bug, I verified his patch and
committed it
Modified:
trunk/netsurf/content/fetch.c
Modified: trunk/netsurf/content/fetch.c
URL:
http://svn.semichrome.net/trunk/netsurf/content/fetch.c?rev=3186&r1=3...
==============================================================================
--- trunk/netsurf/content/fetch.c (original)
+++ trunk/netsurf/content/fetch.c Thu Feb 22 11:48:39 2007
@@ -168,13 +168,16 @@
#define RING_FINDBYHOST(ring, element, hostname) \
LOG(("RING_FINDBYHOST(%s, %s)", #ring, hostname)); \
if (ring) { \
+ bool found = false; \
element = ring; \
do { \
- if (strcasecmp(element->host, hostname) == 0) \
+ if (strcasecmp(element->host, hostname) == 0) { \
+ found = true; \
break; \
+ } \
element = element->r_next; \
} while (element != ring); \
- element = 0; \
+ if (!found) element = 0; \
} else element = 0
/** Measure the size of a ring and put it in the supplied variable */