diff options
author | dimitri staessens <[email protected]> | 2017-09-19 22:00:26 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2017-09-19 22:00:26 +0200 |
commit | 55eda88f17cc4192e7211d46b9a9134f4ee93d92 (patch) | |
tree | 5e87237a988369e1ad9a0c4f4c1a23a6da92e777 /src/ipcpd/normal/dht.c | |
parent | acd8235533d63a7e4dd4d1b5bdb17423d4b6fd75 (diff) | |
download | ouroboros-55eda88f17cc4192e7211d46b9a9134f4ee93d92.tar.gz ouroboros-55eda88f17cc4192e7211d46b9a9134f4ee93d92.zip |
ipcpd: Refuse query when DHT not in running state
Diffstat (limited to 'src/ipcpd/normal/dht.c')
-rw-r--r-- | src/ipcpd/normal/dht.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c index e4c37884..351819c0 100644 --- a/src/ipcpd/normal/dht.c +++ b/src/ipcpd/normal/dht.c @@ -2165,6 +2165,9 @@ uint64_t dht_query(struct dht * dht, addrs[0] = 0; + if (dht_get_state(dht) != DHT_RUNNING) + return 0; + pthread_rwlock_rdlock(&dht->lock); e = dht_find_entry(dht, key); |