X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fprotocol_key.c;h=0746e1c24e8a0b3a99bbd22dcef659b7abd6de37;hb=2cfd1205dc9c6e9d42cc569f415afe13f52357ec;hp=b1be1866e7c1e9f0e3ed1f972f769bf24b3e5a13;hpb=02e5ceb9075f31d418726a3120efc876cf7925d9;p=meshlink diff --git a/src/protocol_key.c b/src/protocol_key.c index b1be1866..0746e1c2 100644 --- a/src/protocol_key.c +++ b/src/protocol_key.c @@ -31,8 +31,6 @@ #include "utils.h" #include "xalloc.h" -static bool mykeyused = false; - void send_key_changed(meshlink_handle_t *mesh) { send_request(mesh, mesh->everyone, "%d %x %s", KEY_CHANGED, rand(), mesh->self->name); @@ -71,7 +69,7 @@ bool key_changed_h(meshlink_handle_t *mesh, connection_t *c, const char *request return true; } -static bool send_initial_sptps_data(void *handle, uint8_t type, const char *data, size_t len) { +static bool send_initial_sptps_data(void *handle, uint8_t type, const void *data, size_t len) { node_t *to = handle; meshlink_handle_t *mesh = to->mesh; to->sptps.send_data = send_sptps_data; @@ -244,7 +242,7 @@ bool ans_key_h(meshlink_handle_t *mesh, connection_t *c, const char *request) { char key[MAX_STRING_SIZE]; char address[MAX_STRING_SIZE] = ""; char port[MAX_STRING_SIZE] = ""; - int cipher, digest, maclength, compression, keylen; + int cipher, digest, maclength, compression; node_t *from, *to; if(sscanf(request, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" %d %d %d %d "MAX_STRING" "MAX_STRING,