X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.c;h=283a949250a95615d5d7a38bf6cff1686a281a97;hb=ea7be103c14b4469b10a96035464f5f3a41167f0;hp=b85795d465e3c64c59bc6c0990f3deb60dfd3f86;hpb=fe7be9e345bcc652914ef6fc51302da13d4c9c8d;p=meshlink diff --git a/src/meshlink.c b/src/meshlink.c index b85795d4..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,6 +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); @@ -1726,6 +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) {