]> git.meshlink.io Git - meshlink/blobdiff - src/net_socket.c
Try all CanonicalAddress and Address statements.
[meshlink] / src / net_socket.c
index 1e981af6b2a61e48357e32b23a83dbbfa613cacf..f98023bd38b2c091ece56dfb23e2eed167405bb7 100644 (file)
@@ -453,7 +453,7 @@ static bool get_next_outgoing_address(meshlink_handle_t *mesh, outgoing_t *outgo
        }
 
        if(outgoing->state == OUTGOING_CANONICAL) {
-               if(outgoing->aip || get_next_cfg(mesh, outgoing, "CanonicalAddress")) {
+               while(outgoing->aip || get_next_cfg(mesh, outgoing, "CanonicalAddress")) {
                        if(get_next_ai(mesh, outgoing)) {
                                return true;
                        } else {
@@ -467,7 +467,7 @@ static bool get_next_outgoing_address(meshlink_handle_t *mesh, outgoing_t *outgo
        }
 
        if(outgoing->state == OUTGOING_RECENT) {
-               if(outgoing->aip || get_next_cfg(mesh, outgoing, "Address")) {
+               while(outgoing->aip || get_next_cfg(mesh, outgoing, "Address")) {
                        if(get_next_ai(mesh, outgoing)) {
                                return true;
                        } else {
@@ -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;
                }