Commit 301c31b5 authored by Geoff Simmons's avatar Geoff Simmons

trackrdrd: ensure that open entries are found by hash_find()

parent 6963c789
......@@ -554,17 +554,16 @@ static hashentry
uint32_t h = h1(xid);
he = &htbl.entry[INDEX(h)];
if (he->xid == xid)
if (he->xid == xid && he->state == HASH_OPEN)
return (he);
h = h2(xid);
unsigned n = 0;
do {
he = &htbl.entry[INDEX(h)];
probes++;
if (he->xid == xid)
if (he->xid == xid && he->state == HASH_OPEN)
break;
probes++;
n++;
h += n * n;
} while (probes <= htbl.max_probes);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment