From 1d761735a505a316a45e027f8e24ac07cdf9ea40 Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Sun, 7 Aug 2016 12:20:31 +1000 Subject: [PATCH] some diagnostic messages --- bbs.c | 4 +++- main.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bbs.c b/bbs.c index 20c0db4..005e9da 100644 --- a/bbs.c +++ b/bbs.c @@ -567,6 +567,8 @@ void runbbs_real(int socket, char *ip, int ssh) { disconnect("Incorrect Login"); } + gUser = user; + for (i=1;i<=conf.nodes;i++) { sprintf(buffer, "%s/nodeinuse.%d", conf.bbs_path, i); if (stat(buffer, &s) == 0) { @@ -639,7 +641,7 @@ void runbbs_real(int socket, char *ip, int ssh) { user->laston = now; save_user(user); } - gUser = user; + user->timeson++; diff --git a/main.c b/main.c index 9c15da4..a2777e8 100644 --- a/main.c +++ b/main.c @@ -518,6 +518,7 @@ void serverssh(int port) { } } while(!chan); if (!chan) { + fprintf(stderr, "Failed to get channel\n"); ssh_finalize(); exit(-1); } @@ -543,6 +544,7 @@ void serverssh(int port) { } while (!shell); if (!shell) { + fprintf(stderr, "Failed to get shell\n"); ssh_finalize(); exit(-1); }