From: Guus Sliepen Date: Fri, 26 Jul 2019 22:49:40 +0000 (+0200) Subject: Ignore online/offline state from Catta. X-Git-Url: http://git.meshlink.io/?a=commitdiff_plain;h=cb9cccebb8d74a573a131ac6794542881f9a7d38;hp=64720408e45d283eaaa5091957d949fab43087ef;p=meshlink Ignore online/offline state from Catta. Catta only works on Ethernet interfaces. However, if there is a non-Ethernet interface, MeshLink might still be able to connect to peers. So just rely on getifaddrs() for checking whether to terminate connections or not. --- diff --git a/src/meshlink.c b/src/meshlink.c index b1f5c918..4a4d3c65 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -3091,18 +3091,13 @@ end: } void handle_network_change(meshlink_handle_t *mesh, bool online) { + (void)online; + if(!mesh->connections) { return; } - if(online) { - retry(mesh); - } else { - // We are off-line. Terminate all active connections. - for list_each(connection_t, c, mesh->connections) { - terminate_connection(mesh, c, false); - } - } + retry(mesh); } static void __attribute__((constructor)) meshlink_init(void) {