some diagnostic messages

This commit is contained in:
Andrew Pamment 2016-08-07 12:20:31 +10:00
parent 0ff68b92c7
commit 1d761735a5
2 changed files with 5 additions and 1 deletions

4
bbs.c
View File

@ -567,6 +567,8 @@ void runbbs_real(int socket, char *ip, int ssh) {
disconnect("Incorrect Login"); disconnect("Incorrect Login");
} }
gUser = user;
for (i=1;i<=conf.nodes;i++) { for (i=1;i<=conf.nodes;i++) {
sprintf(buffer, "%s/nodeinuse.%d", conf.bbs_path, i); sprintf(buffer, "%s/nodeinuse.%d", conf.bbs_path, i);
if (stat(buffer, &s) == 0) { if (stat(buffer, &s) == 0) {
@ -639,7 +641,7 @@ void runbbs_real(int socket, char *ip, int ssh) {
user->laston = now; user->laston = now;
save_user(user); save_user(user);
} }
gUser = user;
user->timeson++; user->timeson++;

2
main.c
View File

@ -518,6 +518,7 @@ void serverssh(int port) {
} }
} while(!chan); } while(!chan);
if (!chan) { if (!chan) {
fprintf(stderr, "Failed to get channel\n");
ssh_finalize(); ssh_finalize();
exit(-1); exit(-1);
} }
@ -543,6 +544,7 @@ void serverssh(int port) {
} while (!shell); } while (!shell);
if (!shell) { if (!shell) {
fprintf(stderr, "Failed to get shell\n");
ssh_finalize(); ssh_finalize();
exit(-1); exit(-1);
} }