Signed-off-by: Maximilian Wilhelm <m...@rfc2324.org> --- multi.c | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/multi.c b/multi.c index 2c23a44..5d8c80e 100644 --- a/multi.c +++ b/multi.c @@ -462,7 +462,9 @@ multi_close_instance (struct multi_context *m, dmsg (D_MULTI_DEBUG, "MULTI: multi_close_instance called"); #ifdef ENABLE_WTMP - wtmp_stop (mi); + if (m->top.options.log_wtmp == 1) + wtmp_stop (mi); + #endif /* prevent dangling pointers */ @@ -1453,7 +1455,8 @@ multi_connection_established (struct multi_context *m, struct multi_instance *mi #endif #ifdef ENABLE_WTMP - wtmp_start (mi); + if (m->top.options.log_wtmp == 1) + wtmp_start (mi); #endif /* @@ -2302,7 +2305,8 @@ tunnel_server (struct context *top) ASSERT (top->options.mode == MODE_SERVER); #ifdef ENABLE_WTMP - wtmp_init(); + if (top->options.log_wtmp == 1) + wtmp_init(top->options.wtmp_server_id, top->options.wtmp_file); #endif switch (top->options.proto) { -- 1.5.2.4