diff options
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 19 | ||||
-rw-r--r-- | TAO/tao/Transport.cpp | 28 |
2 files changed, 30 insertions, 17 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index e8d5af6209e..9f2903d0682 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,14 +1,25 @@ +Fri Jul 20 23:58:12 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Transport.cpp: Fixed a subtle bug. The problem was when + reading a big message. We read part of the message into a stack + allocated buffer. We then grow the buffer to read the rest of + the message. This was working fine. But in the read after + grwoing the buffer, if we get an error we were just returning + to the reactor. This was right. But we have to queue up the + message before returning to the reactor incase we get a + EWOULDBLOCK. + Fri Jul 20 12:58:12 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tao/IIOP_Connection_Handler.h: * tao/IIOP_Connection_Handler.cpp: Removed the resumption of the handler in the handle_output () call. Looks like we dont win anything by resuming the handler at this level. We need to get - back to this after 1.2 if it is required. + back to this after 1.2 if it is required. * tao/Connection_Handler.h: Removed some of the #defines * tao/orbconf.h: Moved the #defines here from - Connection_handler.h. + Connection_handler.h. * tao/Strategies/DIOP_Connection_Handler.h: * tao/Strategies/DIOP_Connection_Handler.cpp: @@ -22,10 +33,10 @@ Fri Jul 20 12:58:12 2001 Balachandran Natarajan <bala@cs.wustl.edu> Fri Jul 20 09:25:00 2001 Craig Rodrigues <crodrigu@bbn.com> - + * tests/ior_corbaloc/run_test.pl: * tests/InterOp-Naming/run_test.pl: - + Do not include ACEutils Perl module in scripts which use PerlACE::Run_Test module. ACEutils prevents PerlACE::Run_Test from seeing the -ExeSubDir argument. diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index a1013295475..a91348edf7a 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -1004,23 +1004,23 @@ TAO_Transport::consolidate_message (ACE_Message_Block &incoming, missing_data, max_wait_time); - // If we got an EWOULDBLOCK or some other error.. - if (n <= 0) + // If we got an error.. + if (n == -1) { - if (n == -1) + if (TAO_debug_level > 4) { - if (TAO_debug_level > 4) - { - ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - TAO_Trasport::consolidate_message," - "error while trying to consolidate \n")); - } - this->tms_->connection_closed (); + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - TAO_Trasport::consolidate_message," + "error while trying to consolidate \n")); } - - return n; + this->tms_->connection_closed (); + return -1; } + // If we had gooten a EWOULDBLOCK n would be equal to zero. But we + // have to put the message in the queue anyway. So let us proceed + // to do that and return... + // Move the write pointer incoming.wr_ptr (n); @@ -1167,9 +1167,11 @@ TAO_Transport::consolidate_message_queue (ACE_Message_Block &incoming, max_wait_time); // Error... - if (n <= 0) + if (n < 0) return n; + // If we get a EWOULDBLOCK ie. n==0, we should anyway put the + // message in queue before returning.. // Move the write pointer qd->msg_block_->wr_ptr (n); |