* oops...also close the client on EOF/error on tty OUTPUT
authorMichael Hampton <io_error@uncensored.citadel.org>
Mon, 9 Feb 2004 22:40:57 +0000 (22:40 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Mon, 9 Feb 2004 22:40:57 +0000 (22:40 +0000)
citadel/ChangeLog
citadel/screen.c

index 45573f2d215e29770438eaf4e2600081de80808c..ee6e9db9c3bb67201552e8b4a4b87b0554aede45 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 0822b0ce91cedf7828b35a547ac09e30693336df..0785cef0b8d37bce44cf0e2aa5f22d2f931291d8 100644 (file)
@@ -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;
 }