From a036178f1a7b4484e7159c4a857632bb10e06739 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 14 Jun 2020 14:45:18 +0200 Subject: [PATCH] React faster to network changes, including point-to-point links. 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 | 1 + src/meshlink.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/discovery.c b/src/discovery.c index 3023444d..7b6cfd0a 100644 --- a/src/discovery.c +++ b/src/discovery.c @@ -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; diff --git a/src/meshlink.c b/src/meshlink.c index a5d8d431..d0b8bef5 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -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) { -- 2.39.5