X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.c;h=283a949250a95615d5d7a38bf6cff1686a281a97;hb=ea7be103c14b4469b10a96035464f5f3a41167f0;hp=f14c4940800b587dcb8f14688aabd9a43ac41c0e;hpb=f75cd07acd98c80464a0f4a9db1eac853ea0a32b;p=meshlink diff --git a/src/meshlink.c b/src/meshlink.c index f14c4940..283a9492 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -975,6 +975,10 @@ static struct timespec idle(event_loop_t *loop, void *data) { meshlink_handle_t *mesh = data; struct timespec t, tmin = {3600, 0}; +#ifdef HAVE_SENDMMSG + flush_mmsg(mesh); +#endif + for splay_each(node_t, n, mesh->nodes) { if(!n->utcp) { continue; @@ -1652,7 +1656,9 @@ bool meshlink_start(meshlink_handle_t *mesh) { return false; } +#if defined(HAVE_RECVMMSG) || defined(HAVE_SENDMMSG) init_mmsg(mesh); +#endif init_outgoings(mesh); init_adns(mesh); @@ -1727,7 +1733,9 @@ void meshlink_stop(meshlink_handle_t *mesh) { exit_adns(mesh); exit_outgoings(mesh); +#if defined(HAVE_RECVMMSG) || defined(HAVE_SENDMMSG) exit_mmsg(mesh); +#endif // Ensure we are considered unreachable if(mesh->nodes) {