]> git.meshlink.io Git - meshlink/blobdiff - src/net_socket.c
Never automatically try to bind to ports >= 32768.
[meshlink] / src / net_socket.c
index 22cbe26fa08cc5725372517b42e829b8218dbcce..8b1263b063fb8df8c5900e68a09361921ac5e636 100644 (file)
@@ -136,6 +136,10 @@ static void handle_meta_write(meshlink_handle_t *mesh, connection_t *c) {
                return;
        }
 
+       if(c->node) {
+               c->node->out_meta += outlen;
+       }
+
        buffer_read(&c->outbuf, outlen);
 
        if(!c->outbuf.len) {
@@ -161,7 +165,7 @@ static void handle_meta_io(event_loop_t *loop, void *data, int flags) {
                if(!result) {
                        finish_connecting(mesh, c);
                } else {
-                       logger(mesh, MESHLINK_DEBUG, "Error while connecting to %s: %s", c->name, sockstrerror(result));
+                       logger(mesh, MESHLINK_ERROR, "Error while connecting to %s: %s", c->name, sockstrerror(result));
                        terminate_connection(mesh, c, false);
                        return;
                }
@@ -378,6 +382,7 @@ begin:
                        /* We are waiting for a callback from the ADNS thread */
                } else if(outgoing->state == OUTGOING_NO_KNOWN_ADDRESSES) {
                        logger(mesh, MESHLINK_ERROR, "No known addresses for %s", outgoing->node->name);
+                       list_delete(mesh->outgoings, outgoing);
                } else {
                        logger(mesh, MESHLINK_ERROR, "Could not set up a meta connection to %s", outgoing->node->name);
                        retry_outgoing(mesh, outgoing);