Skip to content

Commit

Permalink
dht: have getLinks() accept empty parent
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gierth committed Mar 3, 2016
1 parent dfec1bc commit d2a7a93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dht/dhtcore/NodeStore_admin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit d2a7a93

Please sign in to comment.