]> git.meshlink.io Git - meshlink/blobdiff - src/net_socket.c
Lock meshlink.conf to ensure only one instance can run at a time.
[meshlink] / src / net_socket.c
index 01ef942983d610636866f0ffc9ad030114788f56..ea5fdaa03853131d9b19c7b9b17b8fb06525873a 100644 (file)
@@ -545,7 +545,7 @@ begin:
        }
 
        if(c->socket == -1) {
-               logger(mesh, MESHLINK_ERROR, "Creating socket for %s at %s failed: %s", c->name, c->hostname, sockstrerror(sockerrno));
+               logger(mesh, MESHLINK_ERROR, "Creating socket for %s at %s failed: %s", c->name, hostname, sockstrerror(sockerrno));
                free_connection(c);
                free(hostname);
                goto begin;
@@ -725,7 +725,7 @@ void handle_new_meta_connection(event_loop_t *loop, void *data, int flags) {
        c->last_ping_time = mesh->loop.now.tv_sec;
 
        char *hostname = sockaddr2hostname(&sa);
-       logger(mesh, MESHLINK_INFO, "Connection from %s", c->hostname);
+       logger(mesh, MESHLINK_INFO, "Connection from %s", hostname);
        free(hostname);
 
        io_add(&mesh->loop, &c->io, handle_meta_io, c, c->socket, IO_READ);
@@ -782,8 +782,8 @@ void try_outgoing_connections(meshlink_handle_t *mesh) {
 
                if(!check_id(name)) {
                        logger(mesh, MESHLINK_ERROR,
-                              "Invalid name for outgoing connection in %s line %d",
-                              cfg->file, cfg->line);
+                              "Invalid name for outgoing connection in line %d",
+                              cfg->line);
                        free(name);
                        continue;
                }