]> code.citadel.org Git - citadel.git/commitdiff
* connection_died(): Don't crash before printing message, crash afterward.
authorMichael Hampton <io_error@uncensored.citadel.org>
Thu, 20 Mar 2003 08:37:04 +0000 (08:37 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Thu, 20 Mar 2003 08:37:04 +0000 (08:37 +0000)
  (Bugzilla id 111)

citadel/ChangeLog
citadel/citadel_ipc.c
citadel/ipc_c_tcp.c

index cc3122d50a806c142ce7f79afbb9e496402e039b..2bd81036ca5fe748229add35923575263b250430 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 605.25  2003/03/20 08:37:04  error
+ * connection_died(): Don't crash before printing message, crash afterward.
+   (Bugzilla id 111)
+
  Revision 605.24  2003/03/19 11:48:06  error
  * entmsg(): Don't corrupt the msg_arr[] when replying to a message in a room
 
@@ -4580,3 +4584,4 @@ 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 56c3190c73a13a735544db6e88a64cd8efc463b8..8d3e6269440d7f2288047ac779898e8c60ef7da2 100644 (file)
@@ -2612,7 +2612,7 @@ static void serv_read_ssl(CtdlIPC* ipc, char *buf, unsigned int bytes)
                        }
                        error_printf("SSL_read in serv_read:\n");
                        ERR_print_errors_fp(stderr);
-                       connection_died(NULL);
+                       connection_died(ipc);
                        return;
                }
                len += rlen;
@@ -2655,7 +2655,7 @@ static void serv_write_ssl(CtdlIPC *ipc, const char *buf, unsigned int nbytes)
                        }
                        error_printf("SSL_write in serv_write:\n");
                        ERR_print_errors_fp(stderr);
-                       connection_died(NULL);
+                       connection_died(ipc);
                        return;
                }
                bytes_written += retval;
index b26af28ea5e1e83dc9ac7d8c9664e33c08d298dc..e558932b032db1e11bf1d44dc89aeb379c787f0e 100644 (file)
@@ -55,8 +55,10 @@ void connection_died(CtdlIPC *ipc) {
                        "Last error: %s\n"
                        "Please re-connect and log in again.\n",
                        strerror(errno));
-#ifdef HAVE_OPENSSL
+       fflush(stderr);
+       fflush(stdout);
 
+#ifdef HAVE_OPENSSL
        /*  ...don't try to shut down a connection on a dead socket?
        SSL_shutdown(ipc->ssl);
        */