summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/dht.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri.staessens@ugent.be>2018-01-23 01:18:09 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2018-01-23 10:28:52 +0100
commit33e88c2bae0aa76ee23056429abe9514160a3c95 (patch)
tree243cb410262b5fc4c05e508cdb71b2ede0e9d667 /src/ipcpd/normal/dht.c
parent2deb654dc58eb2c25d15b2292366e321e475fb69 (diff)
downloadouroboros-33e88c2bae0aa76ee23056429abe9514160a3c95.tar.gz
ouroboros-33e88c2bae0aa76ee23056429abe9514160a3c95.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 <dimitri.staessens@ugent.be> Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/ipcpd/normal/dht.c')
-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);