From 9d1821efa3526f0fcade70c22bd31c5211538f05 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Fri, 15 Sep 2017 21:32:20 +1000 Subject: [PATCH] Think I've finally fixed ssh --- bbs.c | 2 +- main.c | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bbs.c b/bbs.c index fda72ac..ffc7848 100644 --- a/bbs.c +++ b/bbs.c @@ -471,7 +471,7 @@ void disconnect(char *calledby) { remove(buffer); if (!sshBBS) { close(gSocket); - } + } exit(0); } diff --git a/main.c b/main.c index a97ebd8..698838d 100644 --- a/main.c +++ b/main.c @@ -661,7 +661,7 @@ static void ssh_chan_close(ssh_session session, ssh_channel channel, void *userd (void)session; (void)channel; kill(bbs_pid, SIGTERM); - waitpid(bbs_pid, &status, 0); + //waitpid(bbs_pid, &status, 0); close(fd); } @@ -854,9 +854,6 @@ void serverssh(int port) { tios.c_iflag &= INLCR; tcsetattr(STDIN_FILENO, TCSAFLUSH, &tios); runbbs_ssh(ip); - while (1) { - sleep(100); - } exit(0); } free(ip);