From 7f8d3e240fe9544b22846ea05b09515922d1de57 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Wed, 26 Jan 2011 23:12:19 +0300 Subject: cli: save history to file when telnet client disconnects --- accel-pppd/cli/telnet.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'accel-pppd/cli') diff --git a/accel-pppd/cli/telnet.c b/accel-pppd/cli/telnet.c index 5176df2..7e48782 100644 --- a/accel-pppd/cli/telnet.c +++ b/accel-pppd/cli/telnet.c @@ -74,6 +74,7 @@ static LIST_HEAD(history); static int history_len; static pthread_mutex_t history_lock = PTHREAD_MUTEX_INITIALIZER; +static void save_history_file(void); static void disconnect(struct telnet_client_t *cln) { struct buffer_t *b, *b2; @@ -111,6 +112,7 @@ static void disconnect(struct telnet_client_t *cln) } else _free(b); } + save_history_file(); pthread_mutex_unlock(&history_lock); _free(cln->cmdline); -- cgit v1.2.3