mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 01:09:39 +03:00
Fix RING_FINDBYHOST to actually find things. jmb found the bug, I verified his patch and committed it
svn path=/trunk/netsurf/; revision=3186
This commit is contained in:
parent
d3718bd4a7
commit
657e384a84
@ -168,13 +168,16 @@ static int fetch_cert_verify_callback(X509_STORE_CTX *x509_ctx, void *parm);
|
||||
#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 */
|
||||
|
Loading…
Reference in New Issue
Block a user