summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2018-01-23 01:18:09 +0100
committerSander Vrijders <[email protected]>2018-01-23 10:28:52 +0100
commit33e88c2bae0aa76ee23056429abe9514160a3c95 (patch)
tree243cb410262b5fc4c05e508cdb71b2ede0e9d667 /src
parent2deb654dc58eb2c25d15b2292366e321e475fb69 (diff)
downloadouroboros-0.9.3.tar.gz
ouroboros-0.9.3.zip
ipcpd: Fix lookup handling in DHT0.9.3
Some responses for a query were missed because the lookup went into LU_COMPLETE state while still having pending requests. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/normal/dht.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c
index 7e91d7ad..a59b7781 100644
--- a/src/ipcpd/normal/dht.c
+++ b/src/ipcpd/normal/dht.c
@@ -1669,11 +1669,8 @@ static struct lookup * kad_lookup(struct dht * dht,
switch (state) {
case LU_UPDATE:
lookup_new_addrs(lu, addrs);
- if (addrs[0] == 0) {
- lookup_detach(dht, lu);
- lookup_set_state(lu, LU_COMPLETE);
- return lu;
- }
+ if (addrs[0] == 0)
+ break;
out = kad_find(dht, id, addrs, code);
lookup_add_out(lu, out);