From b6bcdedaa1e540c74f7cf6b116030b14a34aba4e Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Mon, 9 Feb 2004 22:40:57 +0000 Subject: [PATCH] * oops...also close the client on EOF/error on tty OUTPUT --- citadel/ChangeLog | 4 +++- citadel/screen.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 45573f2d2..ee6e9db9c 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 614.25 2004/02/09 22:40:57 error + * oops...also close the client on EOF/error on tty OUTPUT + Revision 614.24 2004/02/09 22:26:17 error * Exit the citadel client when EOF reached on input - should prevent a process from hanging around when a telnet connection dies unexpectedly @@ -5305,4 +5308,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/screen.c b/citadel/screen.c index 0822b0ce9..0785cef0b 100644 --- a/citadel/screen.c +++ b/citadel/screen.c @@ -371,10 +371,14 @@ int scr_putc(int c) #if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES) if (mainwindow) { if (c == 7) beep(); - return ((waddch(mainwindow, c) == OK) ? c : EOF); + if (waddch(mainwindow, c) != OK) + logoff(NULL, 3); + return c; } #endif - return putc(c, stdout); + if (putc(c, stdout) == EOF) + logoff(NULL, 3); + return c; } -- 2.39.2