From: Guus Sliepen Date: Thu, 5 Sep 2019 17:32:42 +0000 (+0200) Subject: When opening a mesh handle, inherit the global log callback. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=9e46fee1c71faad5e6f0b69ff9a92d01d0dad899;p=meshlink When opening a mesh handle, inherit the global log callback. This prevents losing log messages halfway during meshlink_open(). --- 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));