]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_auth.c
Stop using global variable mesh in net.c.
[meshlink] / src / protocol_auth.c
index fa71874f3d4e3464dbeb4f0efddb270b98efafb3..8fad8cc0a1577659f671055150eb1bec80b965a8 100644 (file)
@@ -317,12 +317,12 @@ bool id_h(connection_t *c, const char *request) {
        if(!c->config_tree) {
                init_configuration(&c->config_tree);
 
-               if(!read_host_config(c->config_tree, c->name)) {
+               if(!read_host_config(mesh, c->config_tree, c->name)) {
                        logger(DEBUG_ALWAYS, LOG_ERR, "Peer %s had unknown identity (%s)", c->hostname, c->name);
                        return false;
                }
 
-               read_ecdsa_public_key(c);
+               read_ecdsa_public_key(mesh, c);
        } else {
                if(c->protocol_minor && !ecdsa_active(c->ecdsa))
                        c->protocol_minor = 1;
@@ -412,7 +412,7 @@ bool ack_h(connection_t *c, const char *request) {
                                n->connection->outgoing = NULL;
                        }
 
-                       terminate_connection(n->connection, false);
+                       terminate_connection(mesh, n->connection, false);
                        /* Run graph algorithm to keep things in sync */
                        graph();
                }