diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-07-16 12:11:01 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-07-16 12:11:01 +0000 |
commit | 4d18f68fd8ddddb8af188e1cd68ba452148360d6 (patch) | |
tree | b842ff3fa4c21a64a984e74d4c68e234463a2fd3 | |
parent | de89a6a92a1ce4bbbf79be4078a86707434bcf50 (diff) | |
download | ATCD-4d18f68fd8ddddb8af188e1cd68ba452148360d6.tar.gz |
ChangeLogTag:Tue Jul 16 07:06:33 2002 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | TAO/tao/Asynch_Queued_Message.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/ChangeLog | 36 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 35 | ||||
-rw-r--r-- | TAO/tao/Synch_Queued_Message.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/TAO_Server_Request.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/Transport.cpp | 11 |
6 files changed, 84 insertions, 26 deletions
diff --git a/TAO/tao/Asynch_Queued_Message.cpp b/TAO/tao/Asynch_Queued_Message.cpp index ebd833677b8..248427eb9b1 100644 --- a/TAO/tao/Asynch_Queued_Message.cpp +++ b/TAO/tao/Asynch_Queued_Message.cpp @@ -45,8 +45,6 @@ TAO_Asynch_Queued_Message::~TAO_Asynch_Queued_Message (void) { // @@ Use a pool for these guys! delete[] this->buffer_; - this->is_heap_created_ = 0; - this->allocator_ = 0; } size_t @@ -168,5 +166,11 @@ TAO_Asynch_Queued_Message::destroy (void) { delete this; } + + // Are these needed? Cannot have them in the destructor since + // the ACE_DES_FREE macro first calls the decstructor :(. + // this->is_heap_created_ = 0; + // this->allocator_ = 0; } + } diff --git a/TAO/tao/ChangeLog b/TAO/tao/ChangeLog index 76a64b84e74..ad942f04787 100644 --- a/TAO/tao/ChangeLog +++ b/TAO/tao/ChangeLog @@ -1,31 +1,49 @@ +Tue Jul 16 07:06:33 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Synch_Queued_Message.cpp: + * tao/Asynch_Queued_Message.cpp: Removed code that reset stuff + from the destructor. This caused problems when trying to use + the ACE_DES_FREE macro since it called the destructor first and + then free (). + + * tao/TAO_Server_Request.cpp: All calls to send_message () will + carry an argument mentioning that they are replies. + + * tao/GIOP_Message_Base.cpp: Fixed a problem in dump_msg () + method. The probelm was that we neved respected the byte-order + of the sending ORB when printing out request id's. Thanks to Kew + Whitney <Whitney.Kew@Invensys.com> + + * tao/Transport.cpp: Cosmetic fixes. + Sun Jul 14 10:49:33 2002 Balachandran Natarajan <bala@cs.wustl.edu> * tao/Queued_Message.h: * tao/Queued_Message.cpp: Added an argument in the constructor to pass an allocator. Added a pure virtual method, clone () to the - interface. - + interface. + * tao/Synch_Queued_Message.h: * tao/Synch_Queued_Message.cpp: * tao/Asynch_Queued_Message.h: - * tao/Asynch_Queued_Message.cpp: Implemented the method clone (). + * tao/Asynch_Queued_Message.cpp: Implemented the method clone (). * tao/Incoming_Mesage_Queue.cpp: Fixed a typo in a print statement. Fri Jul 12 14:10:14 2002 Balachandran Natarajan <bala@cs.wustl.edu> - * tao/Transport.h: - * tao/Transport.cpp: + * tao/Transport.h: + * tao/Transport.cpp: - Added a new enum enumerating the different message types - recognised within the ORB. + recognised within the ORB. - Added two new methods send_reply_message_i () and send_synch_message_helper_i (). The method send_reply_message_i () seperates the path of the reply message from the send_synchronous_message_i () method. The method send_synch_message_helper_i () is a helper method - containing common code for the request and reply paths. + containing common code for the request and reply paths. - The methods, send_message (), send_message_shared () and send_message_shared_i () had a variable named @@ -37,9 +55,7 @@ Fri Jul 12 14:10:14 2002 Balachandran Natarajan <bala@cs.wustl.edu> * tao/Strategies/SHMIOP_Transport.cpp: * tao/Strategies/UIOP_Transport.cpp: The variable names is_synchronous was changed to reflect the usage. - + * tao/Invocation.cpp: * tao/Invocation.h: Instead of calling invoke () with a magic number, used the enumeration defined in Transport.h. - - diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 7e89fce4ba5..84a8ec26914 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -882,7 +882,9 @@ TAO_GIOP_Message_Base::process_request (TAO_Transport *transport, return -1; } - int result = transport->send_message (output); + int result = transport->send_message (output, + 0, + TAO_Transport::TAO_REPLY); if (result == -1) { if (TAO_debug_level > 0) @@ -1154,7 +1156,9 @@ TAO_GIOP_Message_Base::make_send_locate_reply (TAO_Transport *transport, status_info); // Send the message - int result = transport->send_message (output); + int result = transport->send_message (output, + 0, + TAO_Transport::TAO_REPLY); // Print out message if there is an error if (result == -1) @@ -1387,7 +1391,9 @@ TAO_GIOP_Message_Base::send_reply_exception ( *x) == -1) return -1; - return transport->send_message (output); + return transport->send_message (output, + 0, + TAO_Transport::TAO_REPLY); } void @@ -1427,22 +1433,33 @@ TAO_GIOP_Message_Base::dump_msg (const char *label, // request/reply id. CORBA::ULong tmp = 0; CORBA::ULong *id = &tmp; + char *tmp_id = 0; if (ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP_REQUEST || ptr[TAO_GIOP_MESSAGE_TYPE_OFFSET] == TAO_GIOP_REPLY) { - // @@ Only works if ServiceContextList is empty.... if (minor < 2) { - id = ACE_reinterpret_cast (CORBA::ULong *, - (char * ) (ptr + TAO_GIOP_MESSAGE_HEADER_LEN + 4)); - + // @@ Only works if ServiceContextList is empty.... + tmp_id = (char * ) (ptr + TAO_GIOP_MESSAGE_HEADER_LEN + 4); } else { - id = ACE_reinterpret_cast (CORBA::ULong *, - (char * ) (ptr + TAO_GIOP_MESSAGE_HEADER_LEN)); + tmp_id = (char * ) (ptr + TAO_GIOP_MESSAGE_HEADER_LEN); } +#if !defined (ACE_DISABLE_SWAP_ON_READ) + if (byte_order == TAO_ENCAP_BYTE_ORDER) + { + id = ACE_reinterpret_cast (ACE_CDR::ULong*, tmp_id); + } + else + { + ACE_CDR::swap_4 (tmp_id, ACE_reinterpret_cast (char*,id)); + } +#else + id = ACE_reinterpret_cast(ACE_CDR::ULong*, tmp_id); +#endif /* ACE_DISABLE_SWAP_ON_READ */ + } // Print. diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp index fe6007fc1de..94e94081d2e 100644 --- a/TAO/tao/Synch_Queued_Message.cpp +++ b/TAO/tao/Synch_Queued_Message.cpp @@ -20,8 +20,7 @@ TAO_Synch_Queued_Message:: TAO_Synch_Queued_Message::~TAO_Synch_Queued_Message (void) { - this->is_heap_created_ = 0; - this->allocator_ = 0; + } const ACE_Message_Block * @@ -164,5 +163,10 @@ TAO_Synch_Queued_Message::destroy (void) { delete this; } + + // Are these needed? Cannot have them in the destructor since + // the ACE_DES_FREE macro first calls the decstructor :(. + // this->is_heap_created_ = 0; + // this->allocator_ = 0; } } diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 4853ab6b0cb..c4b8c4a7759 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -210,7 +210,9 @@ TAO_ServerRequest::send_no_exception_reply (void) reply_params); // Send the message. - int result = this->transport_->send_message (*this->outgoing_); + int result = this->transport_->send_message (*this->outgoing_, + 0, + TAO_Transport::TAO_REPLY); if (result == -1) { @@ -230,7 +232,9 @@ TAO_ServerRequest::send_no_exception_reply (void) void TAO_ServerRequest::tao_send_reply (void) { - int result = this->transport_->send_message (*this->outgoing_); + int result = this->transport_->send_message (*this->outgoing_, + 0, + TAO_Transport::TAO_REPLY); if (result == -1) { if (TAO_debug_level > 0) @@ -310,7 +314,9 @@ TAO_ServerRequest::tao_send_reply_exception (CORBA::Exception &ex) } // Send the message - if (this->transport_->send_message (*this->outgoing_) == -1) + if (this->transport_->send_message (*this->outgoing_, + 0, + TAO_Transport::TAO_REPLY) == -1) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("TAO: (%P|%t|%N|%l): ") diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 84185cb4599..02cb348465c 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -612,6 +612,8 @@ TAO_Transport::send_reply_message_i (const ACE_Message_Block *mb, ACE_ASSERT (n == 0); + ACE_DEBUG ((LM_DEBUG, + "(%P|%t) Going to queue and leave \n")); // Till this point we shouldnt have any copying and that is the // point anyway. Now, remove the node from the list synch_message.remove_from_list (this->head_, @@ -640,6 +642,9 @@ TAO_Transport::send_reply_message_i (const ACE_Message_Block *mb, (void) flushing_strategy->schedule_output (this); + // @@todo: Not sure at this point what will happen if the transport + // get destroyed in between... + return 1; } @@ -1110,6 +1115,12 @@ TAO_Transport::send_message_shared_i (TAO_Stub *stub, return this->send_synchronous_message_i (message_block, max_wait_time); } + else if (write_semantics == TAO_Transport::TAO_REPLY) + { + return this->send_reply_message_i (message_block, + max_wait_time); + } + // Let's figure out if the message should be queued without trying // to send first: |