Think I've finally fixed ssh

This commit is contained in:
Andrew Pamment 2017-09-15 21:32:20 +10:00
parent cafc65e912
commit 9d1821efa3
2 changed files with 2 additions and 5 deletions

2
bbs.c
View File

@ -471,7 +471,7 @@ void disconnect(char *calledby) {
remove(buffer); remove(buffer);
if (!sshBBS) { if (!sshBBS) {
close(gSocket); close(gSocket);
} }
exit(0); exit(0);
} }

5
main.c
View File

@ -661,7 +661,7 @@ static void ssh_chan_close(ssh_session session, ssh_channel channel, void *userd
(void)session; (void)session;
(void)channel; (void)channel;
kill(bbs_pid, SIGTERM); kill(bbs_pid, SIGTERM);
waitpid(bbs_pid, &status, 0); //waitpid(bbs_pid, &status, 0);
close(fd); close(fd);
} }
@ -854,9 +854,6 @@ void serverssh(int port) {
tios.c_iflag &= INLCR; tios.c_iflag &= INLCR;
tcsetattr(STDIN_FILENO, TCSAFLUSH, &tios); tcsetattr(STDIN_FILENO, TCSAFLUSH, &tios);
runbbs_ssh(ip); runbbs_ssh(ip);
while (1) {
sleep(100);
}
exit(0); exit(0);
} }
free(ip); free(ip);