X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=887ccd0d9f394ed6a09e8f14a46dbbb9812e1d77;hb=a20765791b2a40ddd58452e8f74b0737f1f1f28e;hp=8ab1325c23d701982a29a7163e871869e9d7757c;hpb=93f89bcae11e8d250831896bc5694ee8bd2ad22b;p=meshlink diff --git a/src/protocol_key.c b/src/protocol_key.c index 8ab1325c..887ccd0d 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -94,7 +94,7 @@ bool send_req_key(node_t *to) { sptps_stop(&to->sptps); to->status.validkey = false; to->status.waitingforkey = true; - to->last_req_key = now.tv_sec; + to->last_req_key = mesh->loop.now.tv_sec; to->incompression = mesh->self->incompression; return sptps_start(&to->sptps, to, true, true, mesh->self->connection->ecdsa, to->ecdsa, label, sizeof label, send_initial_sptps_data, receive_sptps_record); } @@ -150,7 +150,7 @@ static bool req_key_ext_h(connection_t *c, const char *request, node_t *from, in sptps_stop(&from->sptps); from->status.validkey = false; from->status.waitingforkey = true; - from->last_req_key = now.tv_sec; + from->last_req_key = mesh->loop.now.tv_sec; sptps_start(&from->sptps, from, false, true, mesh->self->connection->ecdsa, from->ecdsa, label, sizeof label, send_sptps_data, receive_sptps_record); sptps_receive_data(&from->sptps, buf, len); return true;