diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2011-01-26 23:12:19 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2011-01-26 23:12:19 +0300 |
commit | 7f8d3e240fe9544b22846ea05b09515922d1de57 (patch) | |
tree | 02a91eafb39936437c1a5088a1e75721da725a95 /accel-pppd/cli | |
parent | 419de8f6910e4fd5d442068ad5ae41b530169470 (diff) | |
download | accel-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.c | 2 |
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); |