From eba5b30f09f91d95c56efb8f1d8613152c176856 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 12 Jul 2020 21:36:12 +0200 Subject: [PATCH] Ensure we compile discovery.c unconditionally. --- src/Makefile.am | 1 + src/meshlink.c | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 640cf64f..b5beee15 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -42,6 +42,7 @@ libmeshlink_la_SOURCES = \ conf.c conf.h \ connection.c connection.h \ crypto.c crypto.h \ + discovery.c discovery.h \ dropin.c dropin.h \ ecdh.h \ ecdsa.h \ diff --git a/src/meshlink.c b/src/meshlink.c index aa29ce89..d9bd0146 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1693,14 +1693,10 @@ static void *meshlink_main_loop(void *arg) { #endif // HAVE_SETNS } -#if HAVE_CATTA - if(mesh->discovery) { discovery_start(mesh); } -#endif - if(pthread_mutex_lock(&mesh->mutex) != 0) { abort(); } @@ -1712,15 +1708,11 @@ static void *meshlink_main_loop(void *arg) { pthread_mutex_unlock(&mesh->mutex); -#if HAVE_CATTA - // Stop discovery if(mesh->discovery) { discovery_stop(mesh); } -#endif - return NULL; } @@ -4554,8 +4546,6 @@ void handle_duplicate_node(meshlink_handle_t *mesh, node_t *n) { } void meshlink_enable_discovery(meshlink_handle_t *mesh, bool enable) { -#if HAVE_CATTA - if(!mesh) { meshlink_errno = MESHLINK_EINVAL; return; @@ -4581,11 +4571,6 @@ void meshlink_enable_discovery(meshlink_handle_t *mesh, bool enable) { end: pthread_mutex_unlock(&mesh->mutex); -#else - (void)mesh; - (void)enable; - meshlink_errno = MESHLINK_ENOTSUP; -#endif } void meshlink_set_dev_class_timeouts(meshlink_handle_t *mesh, dev_class_t devclass, int pinginterval, int pingtimeout) { -- 2.39.5