]> code.citadel.org Git - citadel.git/blobdiff - citadel/commands.c
Fixes for Cygwin (see ChangeLog)
[citadel.git] / citadel / commands.c
index 3888d9185c55b31da6c3f68c3f6700243b56c01a..e68c4436ca43c47f831b7e7f824b50410dcc685c 100644 (file)
 
 #include <signal.h>
 #include <errno.h>
+#include <stdarg.h>
 #include "citadel.h"
 #include "commands.h"
 #include "messages.h"
 #include "citadel_decls.h"
 #include "routines.h"
 #include "routines2.h"
+#ifndef HAVE_SNPRINTF
+#include "snprintf.h"
+#endif
 
 struct citcmd {
        struct citcmd *next;
@@ -124,6 +128,10 @@ void do_keepalive(void) {
        if ((now - idlet) < ((long)S_KEEPALIVE)) return;
        time(&idlet);
 
+       /* Do a space-backspace to keep socksified telnet sessions open */
+       printf(" %c", 8);
+       fflush(stdout);
+
        if (keepalives_enabled != KA_NO) {
                serv_puts("NOOP");
                if (keepalives_enabled == KA_YES) {
@@ -363,6 +371,9 @@ void load_command_set(void) {
                snprintf(buf,sizeof buf,"%s/citadel.rc",BBSDIR);
                ccfile = fopen(buf,"r");
                }
+       if (ccfile==NULL) {
+               ccfile = fopen("./citadel.rc","r");
+               }
        if (ccfile==NULL) {
                perror("commands: cannot open citadel.rc");
                logoff(errno);