From 9e46fee1c71faad5e6f0b69ff9a92d01d0dad899 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 5 Sep 2019 19:32:42 +0200 Subject: [PATCH] When opening a mesh handle, inherit the global log callback. This prevents losing log messages halfway during meshlink_open(). --- src/meshlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/meshlink.c b/src/meshlink.c index e65b7b19..ebe585d2 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1269,6 +1269,8 @@ meshlink_handle_t *meshlink_open_ex(const meshlink_open_params_t *params) { mesh->invitation_timeout = 604800; // 1 week mesh->netns = params->netns; mesh->submeshes = NULL; + mesh->log_cb = global_log_cb; + mesh->log_level = global_log_level; memcpy(mesh->dev_class_traits, default_class_traits, sizeof(default_class_traits)); -- 2.39.2