]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_key.c
Remove some more traces of tinc.
[meshlink] / src / protocol_key.c
index b1be1866e7c1e9f0e3ed1f972f769bf24b3e5a13..97e19610ce7164ad0e17fabdc6d59f3fe0a36a65 100644 (file)
@@ -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;
@@ -91,7 +89,7 @@ bool send_req_key(meshlink_handle_t *mesh, node_t *to) {
                logger(DEBUG_ALWAYS, LOG_DEBUG, "send_req_key(%s) called while sptps->label != NULL!", to->name);
 
        char label[25 + strlen(mesh->self->name) + strlen(to->name)];
-       snprintf(label, sizeof label, "tinc UDP key expansion %s %s", mesh->self->name, to->name);
+       snprintf(label, sizeof label, "MeshLink UDP key expansion %s %s", mesh->self->name, to->name);
        sptps_stop(&to->sptps);
        to->status.validkey = false;
        to->status.waitingforkey = true;
@@ -147,7 +145,7 @@ static bool req_key_ext_h(meshlink_handle_t *mesh, connection_t *c, const char *
                        }
 
                        char label[25 + strlen(from->name) + strlen(mesh->self->name)];
-                       snprintf(label, sizeof label, "tinc UDP key expansion %s %s", from->name, mesh->self->name);
+                       snprintf(label, sizeof label, "MeshLink UDP key expansion %s %s", from->name, mesh->self->name);
                        sptps_stop(&from->sptps);
                        from->status.validkey = false;
                        from->status.waitingforkey = true;
@@ -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,