]> git.meshlink.io Git - meshlink/blobdiff - src/protocol_auth.c
Don't use assert() to check the results of pthread_*() calls.
[meshlink] / src / protocol_auth.c
index 5632c5a216d23c044e07d820da8661fc4b501f8e..201cac9fe000eef05b17561fd4223ec31805e60b 100644 (file)
@@ -298,7 +298,7 @@ static void send_everything(meshlink_handle_t *mesh, connection_t *c) {
        /* Send all known subnets and edges */
 
        for splay_each(node_t, n, mesh->nodes) {
-               for splay_each(edge_t, e, n->edge_tree) {
+               for inner_splay_each(edge_t, e, n->edge_tree) {
                        send_add_edge(mesh, c, e, 0);
                }
        }
@@ -365,6 +365,7 @@ bool ack_h(meshlink_handle_t *mesh, connection_t *c, const char *request) {
        /* Activate this connection */
 
        c->allow_request = ALL;
+       c->last_key_renewal = mesh->loop.now.tv_sec;
        c->status.active = true;
 
        logger(mesh, MESHLINK_INFO, "Connection with %s activated", c->name);