]> git.meshlink.io Git - meshlink/commitdiff
Try all CanonicalAddress and Address statements.
authorGuus Sliepen <guus@meshlink.io>
Sun, 18 Nov 2018 23:03:27 +0000 (00:03 +0100)
committerGuus Sliepen <guus@meshlink.io>
Sun, 18 Nov 2018 23:03:27 +0000 (00:03 +0100)
src/net_socket.c

index ea5fdaa03853131d9b19c7b9b17b8fb06525873a..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 {