X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=b614494b74b55cc2b41fdc0daaffa7f1ef00ff9a;hb=4c57e6902219ecca1872e18e34365d8e54a0f407;hp=8a1d6000947df5057953c5212c44529ebb2b5026;hpb=fe5563f92021618b4a8b41e412c73d8364fcaf6e;p=meshlink diff --git a/src/protocol_key.c b/src/protocol_key.c index 8a1d6000..b614494b 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -135,7 +135,7 @@ static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char * for list_each(outgoing_t, outgoing, mesh->outgoings) { if(outgoing->node == from && outgoing->ev.cb) { outgoing->timeout = 0; - timeout_set(&mesh->loop, &outgoing->ev, &(struct timeval) { + timeout_set(&mesh->loop, &outgoing->ev, &(struct timespec) { 0, 0 }); } @@ -354,7 +354,7 @@ bool ans_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { /* Inform all other nodes we want to communicate with and which are reachable via this connection */ for splay_each(node_t, n, mesh->nodes) { - if(n->nexthop == c->node) { + if(n->nexthop != c->node) { continue; }