X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=9f69d803b6800c7f314f1ff7df17c40a49485093;hb=a5a8005b2d89712e124ab7295165a3e229abdad5;hp=a9bc1c0ae04784b66bf8f3a0cf4b518c22234ec7;hpb=9cde0d32cf209388cc59b06b7dcb0c3432f97da5;p=meshlink diff --git a/src/protocol_key.c b/src/protocol_key.c index a9bc1c0a..9f69d803 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -34,7 +34,7 @@ static const int req_key_timeout = 2; void send_key_changed(meshlink_handle_t *mesh) { - send_request(mesh, mesh->everyone, NULL, "%d %x %s", KEY_CHANGED, rand(), mesh->self->name); + send_request(mesh, mesh->everyone, NULL, "%d %x %s", KEY_CHANGED, prng(mesh, UINT_MAX), mesh->self->name); /* Force key exchange for connections using SPTPS */ @@ -275,12 +275,6 @@ bool req_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { return true; } -bool send_ans_key(meshlink_handle_t *mesh, node_t *to) { - (void)mesh; - (void)to; - abort(); -} - bool ans_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { assert(request); assert(*request);