diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-17 21:26:04 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-17 21:26:04 +0000 |
commit | e7c4c41bacc88059c50bd88626daee664d61bacc (patch) | |
tree | f8a60969f3ff245fd66aa6e4621cb42e750fb4d5 | |
parent | 72342b1082e126f223e8bd6c5a82adbd20f55cb3 (diff) | |
download | ATCD-e7c4c41bacc88059c50bd88626daee664d61bacc.tar.gz |
ChangeLogTag:Tue Apr 17 14:21:23 2001 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 27 | ||||
-rw-r--r-- | TAO/tao/Asynch_Queued_Message.cpp | 5 | ||||
-rw-r--r-- | TAO/tao/Asynch_Queued_Message.h | 2 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Handler.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Queued_Message.h | 2 | ||||
-rw-r--r-- | TAO/tao/Sync_Strategies.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Synch_Queued_Message.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Synch_Queued_Message.h | 2 | ||||
-rw-r--r-- | TAO/tao/Transport.cpp | 8 |
9 files changed, 45 insertions, 17 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 49431ad4805..2eb71943b72 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,30 @@ +Tue Apr 17 14:21:23 2001 Carlos O'Ryan <coryan@uci.edu> + + * tao/Queued_Message.h: + * tao/Asynch_Queued_Message.h: + * tao/Asynch_Queued_Message.cpp: + * tao/Synch_Queued_Message.h: + The bytes_transferred() method does not need to return anything, + the return value was ignored anyway, so change it to return + void. + + * tao/Synch_Queued_Message.cpp: + Fixed implementation of bytes_transferred(), the byte_count + argument was not updated on all exit branches. + + * tao/GIOP_Message_Handler.cpp: + Fixed inconsistency with main trunk. + + * tao/Sync_Strategies.cpp: + Set the must_flush and set_timer flags to zero if there is no + buffering constraint policy. + + * tao/Transport.cpp: + Cosmetic fixes. Return 1 from drain_queue_i() even if the flush + operation returned 0, the return value is supposed to represent + what happened to the message, not if there was a generic problem + with the ORB. + Tue Apr 17 09:59:38 2001 Carlos O'Ryan <coryan@uci.edu> * tao/Sync_Strategies.h: diff --git a/TAO/tao/Asynch_Queued_Message.cpp b/TAO/tao/Asynch_Queued_Message.cpp index 1123eb99bd0..b848b178a97 100644 --- a/TAO/tao/Asynch_Queued_Message.cpp +++ b/TAO/tao/Asynch_Queued_Message.cpp @@ -55,7 +55,7 @@ TAO_Asynch_Queued_Message::fill_iov (int iovcnt_max, iovcnt++; } -int +void TAO_Asynch_Queued_Message::bytes_transferred (size_t &byte_count) { size_t remaining_bytes = this->size_ - this->offset_; @@ -63,11 +63,10 @@ TAO_Asynch_Queued_Message::bytes_transferred (size_t &byte_count) { this->offset_ = this->size_; byte_count -= remaining_bytes; - return 1; + return; } this->offset_ += byte_count; byte_count = 0; - return 0; } void diff --git a/TAO/tao/Asynch_Queued_Message.h b/TAO/tao/Asynch_Queued_Message.h index d3c683c1238..dbb4ca38bb0 100644 --- a/TAO/tao/Asynch_Queued_Message.h +++ b/TAO/tao/Asynch_Queued_Message.h @@ -50,7 +50,7 @@ public: virtual size_t message_length (void) const; virtual int all_data_sent (void) const; virtual void fill_iov (int iovcnt_max, int &iovcnt, iovec iov[]) const; - virtual int bytes_transferred (size_t &byte_count); + virtual void bytes_transferred (size_t &byte_count); virtual void destroy (void); //@} diff --git a/TAO/tao/GIOP_Message_Handler.cpp b/TAO/tao/GIOP_Message_Handler.cpp index e880198a904..3443e7d8273 100644 --- a/TAO/tao/GIOP_Message_Handler.cpp +++ b/TAO/tao/GIOP_Message_Handler.cpp @@ -484,6 +484,9 @@ TAO_GIOP_Message_Handler::read_messages (TAO_Transport *transport) return -1; } + // Now we have a succesful read. First adjust the write pointer + this->current_buffer_.wr_ptr (n); + if (TAO_debug_level == 2) { ACE_DEBUG ((LM_DEBUG, @@ -505,10 +508,6 @@ TAO_GIOP_Message_Handler::read_messages (TAO_Transport *transport) ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) - received %d bytes \n", n)); } - // Now we have a succesful read. First adjust the write pointer - this->current_buffer_.wr_ptr (n); - - return 0; } diff --git a/TAO/tao/Queued_Message.h b/TAO/tao/Queued_Message.h index e403df1d8d1..069b778f10f 100644 --- a/TAO/tao/Queued_Message.h +++ b/TAO/tao/Queued_Message.h @@ -170,7 +170,7 @@ public: * @return Returns 1 if the TAO_Queued_Message has any more data to * send. */ - virtual int bytes_transferred (size_t &byte_count) = 0; + virtual void bytes_transferred (size_t &byte_count) = 0; /// Reclaim resources /** diff --git a/TAO/tao/Sync_Strategies.cpp b/TAO/tao/Sync_Strategies.cpp index abd765fb917..463822fadeb 100644 --- a/TAO/tao/Sync_Strategies.cpp +++ b/TAO/tao/Sync_Strategies.cpp @@ -61,6 +61,9 @@ TAO_Eager_Buffering_Sync_Strategy:: int &set_timer, ACE_Time_Value &new_deadline) { + must_flush = 0; + set_timer = 0; + TAO_Buffering_Constraint_Policy *buffering_constraint_policy = stub->buffering_constraint (); diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp index 545a1fdadcc..eca7e879855 100644 --- a/TAO/tao/Synch_Queued_Message.cpp +++ b/TAO/tao/Synch_Queued_Message.cpp @@ -62,7 +62,7 @@ TAO_Synch_Queued_Message::fill_iov (int iovcnt_max, } } -int +void TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count) { while (this->current_block_ != 0 && byte_count > 0) @@ -71,12 +71,12 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count) if (byte_count < l) { this->current_block_->rd_ptr (byte_count); - return 0; + byte_count = 0; + return; } byte_count -= l; this->current_block_ = this->current_block_->cont (); } - return (this->current_block_ == 0); } void diff --git a/TAO/tao/Synch_Queued_Message.h b/TAO/tao/Synch_Queued_Message.h index 3e0ea5a7610..2a8c638abf7 100644 --- a/TAO/tao/Synch_Queued_Message.h +++ b/TAO/tao/Synch_Queued_Message.h @@ -61,7 +61,7 @@ public: virtual size_t message_length (void) const; virtual int all_data_sent (void) const; virtual void fill_iov (int iovcnt_max, int &iovcnt, iovec iov[]) const; - virtual int bytes_transferred (size_t &byte_count); + virtual void bytes_transferred (size_t &byte_count); virtual void destroy (void); //@} diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 5109be17639..677a7ef68c8 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -475,7 +475,7 @@ TAO_Transport::send_synchronous_message_i (const ACE_Message_Block *mb, &synch_message, max_wait_time); } - if (result == -1&& errno == ETIME) + if (result == -1 && errno == ETIME) { if (this->head_ != &synch_message) { @@ -515,7 +515,7 @@ TAO_Transport::send_synchronous_message_i (const ACE_Message_Block *mb, ACE_ASSERT (synch_message.next () == 0); ACE_ASSERT (synch_message.prev () == 0); - return result; + return 1; } int @@ -927,7 +927,7 @@ TAO_Transport::drain_queue_i (void) } else if (retval == -1) { - if (errno == EWOULDBLOCK || errno == ETIME) + if (errno == EWOULDBLOCK) return 0; return -1; } @@ -965,7 +965,7 @@ TAO_Transport::drain_queue_i (void) } else if (retval == -1) { - if (errno == EWOULDBLOCK || errno == ETIME) + if (errno == EWOULDBLOCK) return 0; return -1; } |