summaryrefslogtreecommitdiff
path: root/accel-pppd/cli
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-26 23:12:19 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-26 23:12:19 +0300
commit7f8d3e240fe9544b22846ea05b09515922d1de57 (patch)
tree02a91eafb39936437c1a5088a1e75721da725a95 /accel-pppd/cli
parent419de8f6910e4fd5d442068ad5ae41b530169470 (diff)
downloadaccel-ppp-7f8d3e240fe9544b22846ea05b09515922d1de57.tar.gz
accel-ppp-7f8d3e240fe9544b22846ea05b09515922d1de57.zip
cli: save history to file when telnet client disconnects
Diffstat (limited to 'accel-pppd/cli')
-rw-r--r--accel-pppd/cli/telnet.c2
1 files changed, 2 insertions, 0 deletions
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);