From 7016e2f5500c361cbba5edef0644673a3345aea7 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 c34b24c9..b3943791 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1653,14 +1653,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(); } @@ -1672,15 +1668,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; } @@ -4475,8 +4467,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; @@ -4502,11 +4492,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