From d2a7a933698153cbc9877621dfe975aeba01f123 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Thu, 3 Mar 2016 19:08:33 +0100 Subject: [PATCH] dht: have getLinks() accept empty parent --- dht/dhtcore/NodeStore_admin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dht/dhtcore/NodeStore_admin.c b/dht/dhtcore/NodeStore_admin.c index 4f0495505..bf61e348c 100644 --- a/dht/dhtcore/NodeStore_admin.c +++ b/dht/dhtcore/NodeStore_admin.c @@ -124,7 +124,7 @@ static void getLink(Dict* args, void* vcontext, String* txid, struct Allocator* String* ipStr = Dict_getString(args, String_new("parent", alloc)); int64_t* linkNum = Dict_getInt(args, String_new("linkNum", alloc)); - if (ipStr) { + if (ipStr && ipStr->len) { uint8_t ip[16]; if (AddrTools_parseIp(ip, ipStr->bytes)) { Dict_remove(ret, String_CONST("result"));