]> git.meshlink.io Git - meshlink/commitdiff
React faster to network changes, including point-to-point links.
authorGuus Sliepen <guus@meshlink.io>
Sun, 14 Jun 2020 12:45:18 +0000 (14:45 +0200)
committerGuus Sliepen <guus@meshlink.io>
Sun, 14 Jun 2020 12:45:18 +0000 (14:45 +0200)
Tell Catta to also include point-to-point links, and when we get an
update from the Catta thread, wake up the main MeshLink thread so we
react to it immediately.

src/discovery.c
src/meshlink.c

index 3023444d58a5139bb4f4c65569ad12cab68a0c4c..7b6cfd0a96f3f4893c2a072897ac4f752bcd07b1 100644 (file)
@@ -392,6 +392,7 @@ static void *discovery_loop(void *userdata) {
        config.publish_hinfo = 0;
        config.publish_addresses = 1;
        config.publish_no_reverse = 1;
+       config.allow_point_to_point = 1;
 
        /* Allocate a new server */
        int error;
index a5d8d43121b025cf1c7b5993c93b4f464d31e675..d0b8bef5d7c6ee46533069baf865939610070887 100644 (file)
@@ -4305,6 +4305,7 @@ void handle_network_change(meshlink_handle_t *mesh, bool online) {
        }
 
        retry(mesh);
+       signal_trigger(&mesh->loop, &mesh->datafromapp);
 }
 
 void call_error_cb(meshlink_handle_t *mesh, meshlink_errno_t cb_errno) {