OSDN Git Service

2004-03-22 Dave Brolley <brolley@redhat.com>
authorbrolley <brolley>
Mon, 22 Mar 2004 21:26:44 +0000 (21:26 +0000)
committerbrolley <brolley>
Mon, 22 Mar 2004 21:26:44 +0000 (21:26 +0000)
        * socketio.cxx (fini_handler): Flush out remaining data before
        terminating.

sid/component/consoles/ChangeLog
sid/component/consoles/socketio.cxx

index 384d946..f59592f 100644 (file)
@@ -1,3 +1,8 @@
+2004-03-22  Dave Brolley  <brolley@redhat.com>
+
+       * socketio.cxx (fini_handler): Flush out remaining data before
+       terminating.
+
 2003-07-14  Dave Brolley  <brolley@redhat.com>
 
        * stdio.cxx (read): Restore flags to their original state.
index c997ad9..1d420ec 100644 (file)
@@ -1,7 +1,7 @@
 // socketio.cxx - A console that uses a socket to do its I/O.
 // -*- C++ -*-
 
-// Copyright (C) 1999, 2000, 2002 Red Hat.
+// Copyright (C) 1999-2002, 2004 Red Hat.
 // This file is part of SID and is licensed under the GPL.
 // See the file COPYING.SID for conditions for redistribution.
 
@@ -298,6 +298,10 @@ socketio::fini_handler (host_int_4)
 {
   this->poll_control.cancel ();
 
+  // Flush out any remaining data
+  while (this->connected_p && this->out_buffer.length() != 0)
+    this->poll_transmit ();
+
   if (this->connected_p)
     {
       assert (this->fd >= 0);