Signed-off-by: Maximilian Wilhelm <[email protected]>
---
multi.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/multi.c b/multi.c
index fa924f1..2c23a44 100644
--- a/multi.c
+++ b/multi.c
@@ -42,6 +42,10 @@
#include "forward-inline.h"
+#ifdef ENABLE_WTMP
+#include "wtmp.h"
+#endif
+
/*#define MULTI_DEBUG_EVENT_LOOP*/
#ifdef MULTI_DEBUG_EVENT_LOOP
@@ -457,6 +461,10 @@ multi_close_instance (struct multi_context *m,
dmsg (D_MULTI_DEBUG, "MULTI: multi_close_instance called");
+#ifdef ENABLE_WTMP
+ wtmp_stop (mi);
+#endif
+
/* prevent dangling pointers */
if (m->pending == mi)
multi_set_pending (m, NULL);
@@ -1444,6 +1452,10 @@ multi_connection_established (struct multi_context *m,
struct multi_instance *mi
}
#endif
+#ifdef ENABLE_WTMP
+ wtmp_start (mi);
+#endif
+
/*
* Run --client-connect script.
*/
@@ -2289,6 +2301,10 @@ tunnel_server (struct context *top)
{
ASSERT (top->options.mode == MODE_SERVER);
+#ifdef ENABLE_WTMP
+ wtmp_init();
+#endif
+
switch (top->options.proto) {
case PROTO_UDPv4:
tunnel_server_udp (top);
--
1.5.2.4