diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-24 10:38:59 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-24 10:38:59 +0000 |
commit | 656cd314b3401b921f55c10a3c0841dfa37c2e23 (patch) | |
tree | e0e62c302670d1d315dfcbf13cf200567afc4b81 | |
parent | 17031551bd88510ae9812d102dc669151b4e7a5d (diff) | |
download | ATCD-656cd314b3401b921f55c10a3c0841dfa37c2e23.tar.gz |
Tue Jul 24 10:38:23 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | TAO/ChangeLog | 24 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 267 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.h | 5 | ||||
-rw-r--r-- | TAO/tao/Incoming_Message_Queue.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/Incoming_Message_Stack.inl | 4 | ||||
-rw-r--r-- | TAO/tao/Queued_Data.h | 42 | ||||
-rw-r--r-- | TAO/tao/Queued_Data.inl | 76 | ||||
-rw-r--r-- | TAO/tao/Queued_Message.h | 20 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Transport.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/Strategies/SHMIOP_Transport.cpp | 27 | ||||
-rw-r--r-- | TAO/tao/Transport.cpp | 98 |
11 files changed, 356 insertions, 227 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 2d018375dca..54487bfb545 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,27 @@ +Tue Jul 24 10:38:23 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> + + * tao/Queued_Data.{h,inl}: + Made all members private and added inlined accessor methods. This + makes it easier to change the members to a GIOP_Message_State + instance. Added a set_state method that accepts a GIOP_Message_State + instance + + * tao/GIOP_Message_Base.cpp: + * tao/GIOP_Message_Base.h: + * tao/Incoming_Message_Queue.cpp: + * tao/Incoming_Message_Stack.inl: + * tao/Strategies/DIOP_Transport.cpp: + * tao/Strategies/SHMIOP_Transport.cpp: + * tao/Transport.cpp: + Updated for the changes to Queued_Data + + * tao/GIOP_Message_Base.cpp: + * tao/Transport.cpp: + Changed a few large if checks to a switch statement + + * tao/Queued_Message.h: + No need to declare the list manipulation methods as virtual + Tue Jul 24 09:41:23 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl> * tao/Incoming_Message_Stack.{h,inl}: diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index ffd482eadfc..bce396e8e5a 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -75,8 +75,8 @@ TAO_GIOP_Message_Base::generate_request_header ( { // Get a parser for us TAO_GIOP_Message_Generator_Parser *generator_parser = 0; - - CORBA::Octet major, minor; + CORBA::Octet major = 0; + CORBA::Octet minor = 0; cdr.get_version (major, minor); @@ -116,8 +116,8 @@ TAO_GIOP_Message_Base::generate_locate_request_header ( { // Get a parser for us TAO_GIOP_Message_Generator_Parser *generator_parser = 0; - - CORBA::Octet major, minor; + CORBA::Octet major = 0; + CORBA::Octet minor = 0; cdr.get_version (major, minor); @@ -157,8 +157,8 @@ TAO_GIOP_Message_Base::generate_reply_header ( { // Get a parser for us TAO_GIOP_Message_Generator_Parser *generator_parser = 0; - - CORBA::Octet major, minor; + CORBA::Octet major = 0; + CORBA::Octet minor = 0; cdr.get_version (major, minor); @@ -209,8 +209,8 @@ TAO_GIOP_Message_Base::generate_fragment_header (TAO_OutputCDR & cdr, { // Get a parser for us TAO_GIOP_Message_Generator_Parser *generator_parser = 0; - - CORBA::Octet major, minor; + CORBA::Octet major = 0; + CORBA::Octet minor = 0; cdr.get_version (major, minor); @@ -301,7 +301,7 @@ TAO_GIOP_Message_Base::parse_next_message (ACE_Message_Block &incoming, { if (incoming.length () < TAO_GIOP_MESSAGE_HEADER_LEN) { - qd.missing_data_ = TAO_MISSING_DATA_UNDEFINED; + qd.missing_data (TAO_MISSING_DATA_UNDEFINED); return 0; /* incomplete header */ } @@ -318,15 +318,15 @@ TAO_GIOP_Message_Base::parse_next_message (ACE_Message_Block &incoming, if (message_size > incoming.length ()) { - qd.missing_data_ = message_size - incoming.length (); + qd.missing_data (message_size - incoming.length ()); } else { - qd.missing_data_ = 0; + qd.missing_data (0); } /* init out-parameters */ - this->init_queued_data (&qd, state); + qd.set_state (state); mesg_length = TAO_GIOP_MESSAGE_HEADER_LEN + state.payload_size (); return 1; /* complete header */ @@ -367,11 +367,11 @@ TAO_GIOP_Message_Base::extract_next_message (ACE_Message_Block &incoming, return -1; } - qd->msg_block_->copy (incoming.rd_ptr (), incoming.length ()); + qd->msg_block ()->copy (incoming.rd_ptr (), incoming.length ()); incoming.rd_ptr (incoming.length ()); // consume all available data - qd->missing_data_ = TAO_MISSING_DATA_UNDEFINED; + qd->missing_data (TAO_MISSING_DATA_UNDEFINED); } else { @@ -405,18 +405,18 @@ TAO_GIOP_Message_Base::extract_next_message (ACE_Message_Block &incoming, if (copying_len > incoming.length ()) { - qd->missing_data_ = copying_len - incoming.length (); + qd->missing_data (copying_len - incoming.length ()); copying_len = incoming.length (); } else { - qd->missing_data_ = 0; + qd->missing_data (0); } - qd->msg_block_->copy (incoming.rd_ptr (), copying_len); + qd->msg_block ()->copy (incoming.rd_ptr (), copying_len); incoming.rd_ptr (copying_len); - this->init_queued_data (qd, state); + qd->set_state (state); return 1; } @@ -426,11 +426,11 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, ACE_Message_Block &incoming) { // Look to see whether we had atleast parsed the GIOP header ... - if (qd->missing_data_ == TAO_MISSING_DATA_UNDEFINED) + if (qd->missing_data () == TAO_MISSING_DATA_UNDEFINED) { // The data length that has been stuck in there during the last // read .... - size_t const len = qd->msg_block_->length (); + size_t const len = qd->msg_block ()->length (); // paranoid check if (len >= TAO_GIOP_MESSAGE_HEADER_LEN) @@ -453,7 +453,7 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, return -1; } - if (qd->msg_block_->copy (incoming.rd_ptr (), n_copy) == -1) + if (qd->msg_block ()->copy (incoming.rd_ptr (), n_copy) == -1) { return -1; } @@ -462,7 +462,7 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, incoming.rd_ptr (n_copy); // verify sufficient data to parse GIOP header - if (qd->msg_block_->length () < TAO_GIOP_MESSAGE_HEADER_LEN) + if (qd->msg_block ()->length () < TAO_GIOP_MESSAGE_HEADER_LEN) { return 0; /* continue */ } @@ -470,7 +470,7 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, TAO_GIOP_Message_State state; // Parse the message header now... - if (state.parse_message_header (*qd->msg_block_) == -1) + if (state.parse_message_header (*qd->msg_block ()) == -1) { if (TAO_debug_level > 0) { @@ -482,7 +482,7 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, } // Now grow the message block so that we can copy the rest of // the data, the message_block must be able to hold complete message - if (ACE_CDR::grow (qd->msg_block_, + if (ACE_CDR::grow (qd->msg_block (), state.message_size ()) == -1) /* GIOP_Header + Payload */ { // on mem-error get rid of context silently, try to avoid @@ -499,19 +499,19 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, if (copy_len > incoming.length ()) { // Calculate the missing data.. - qd->missing_data_ = copy_len - incoming.length (); + qd->missing_data (copy_len - incoming.length ()); // Set the actual possible copy_len that is available... copy_len = incoming.length (); } else { - qd->missing_data_ = 0; + qd->missing_data (0); } // ..now we are set to copy the right amount of data to the // node.. - if (qd->msg_block_->copy (incoming.rd_ptr (), copy_len) == -1) + if (qd->msg_block ()->copy (incoming.rd_ptr (), copy_len) == -1) { return -1; } @@ -520,17 +520,17 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, incoming.rd_ptr (copy_len); // Get the other details... - this->init_queued_data (qd, state); + qd->set_state (state); } else { // @@todo: Need to abstract this out to a seperate method... - size_t copy_len = qd->missing_data_; + size_t copy_len = qd->missing_data (); if (copy_len > incoming.length ()) { // Calculate the missing data.. - qd->missing_data_ = copy_len - incoming.length (); + qd->missing_data (copy_len - incoming.length ()); // Set the actual possible copy_len that is available... copy_len = incoming.length (); @@ -544,13 +544,13 @@ TAO_GIOP_Message_Base::consolidate_node (TAO_Queued_Data *qd, // Copy the right amount of data in to the node... // node.. - if (qd->msg_block_->copy (incoming.rd_ptr (), copy_len) == -1) + if (qd->msg_block ()->copy (incoming.rd_ptr (), copy_len) == -1) { return -1; } // Set the <rd_ptr> of the <incoming>.. - qd->msg_block_->rd_ptr (copy_len); + qd->msg_block ()->rd_ptr (copy_len); } @@ -568,7 +568,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, TAO_GIOP_Message_Generator_Parser *generator_parser = 0; // Get the state information that we need to use - this->set_state (qd->major_version_, qd->minor_version_, generator_parser); + this->set_state (qd->major_version (), qd->minor_version (), generator_parser); // A buffer that we will use to initialise the CDR stream. Since we're // allocating the buffer on the stack, we may as well allocate the data @@ -602,18 +602,18 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, this->orb_core_->input_cdr_msgblock_allocator (), this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (), this->fragmentation_strategy_.get (), - qd->major_version_, - qd->minor_version_); + qd->major_version (), + qd->minor_version ()); // Get the read and write positions before we steal data. - size_t rd_pos = qd->msg_block_->rd_ptr () - qd->msg_block_->base (); - size_t const wr_pos = qd->msg_block_->wr_ptr () - qd->msg_block_->base (); + size_t rd_pos = qd->msg_block ()->rd_ptr () - qd->msg_block ()->base (); + size_t const wr_pos = qd->msg_block ()->wr_ptr () - qd->msg_block ()->base (); rd_pos += TAO_GIOP_MESSAGE_HEADER_LEN; if (TAO_debug_level > 0) this->dump_msg ("recv", - reinterpret_cast <u_char *> (qd->msg_block_->rd_ptr ()), - qd->msg_block_->length ()); + reinterpret_cast <u_char *> (qd->msg_block ()->rd_ptr ()), + qd->msg_block ()->length ()); // Create a input CDR stream. We do the following @@ -630,27 +630,27 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, ACE_Data_Block *db = 0; // Get the flag in the message block - flg = qd->msg_block_->self_flags (); + flg = qd->msg_block ()->self_flags (); if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE)) { // Use the same datablock - db = qd->msg_block_->data_block (); + db = qd->msg_block ()->data_block (); } else { // Use a duplicated datablock as the datablock has come off the // heap. - db = qd->msg_block_->data_block ()->duplicate (); + db = qd->msg_block ()->data_block ()->duplicate (); } TAO_InputCDR input_cdr (db, flg, rd_pos, wr_pos, - qd->byte_order_, - qd->major_version_, - qd->minor_version_, + qd->byte_order (), + qd->major_version (), + qd->minor_version (), this->orb_core_); transport->assign_translators(&input_cdr,&output); @@ -662,7 +662,7 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport, // the stream and never touch that again for anything. We basically // loose ownership of the data_block. - switch (qd->msg_type_) + switch (qd->msg_type ()) { case TAO_PLUGGABLE_MESSAGE_REQUEST: // Should be taken care by the state specific invocations. They @@ -692,30 +692,30 @@ TAO_GIOP_Message_Base::process_reply_message ( TAO_GIOP_Message_Generator_Parser *generator_parser = 0; // Get the state information that we need to use - this->set_state (qd->major_version_, qd->minor_version_, generator_parser); + this->set_state (qd->major_version (), qd->minor_version (), generator_parser); // Get the read and write positions before we steal data. - size_t rd_pos = qd->msg_block_->rd_ptr () - qd->msg_block_->base (); - size_t const wr_pos = qd->msg_block_->wr_ptr () - qd->msg_block_->base (); + size_t rd_pos = qd->msg_block ()->rd_ptr () - qd->msg_block ()->base (); + size_t const wr_pos = qd->msg_block ()->wr_ptr () - qd->msg_block ()->base (); rd_pos += TAO_GIOP_MESSAGE_HEADER_LEN; if (TAO_debug_level > 0) this->dump_msg ("recv", - reinterpret_cast <u_char *> (qd->msg_block_->rd_ptr ()), - qd->msg_block_->length ()); + reinterpret_cast <u_char *> (qd->msg_block ()->rd_ptr ()), + qd->msg_block ()->length ()); // Create a empty buffer on stack // NOTE: We use the same data block in which we read the message and // we pass it on to the higher layers of the ORB. So we dont to any // copies at all here. - TAO_InputCDR input_cdr (qd->msg_block_->data_block (), + TAO_InputCDR input_cdr (qd->msg_block ()->data_block (), ACE_Message_Block::DONT_DELETE, rd_pos, wr_pos, - qd->byte_order_, - qd->major_version_, - qd->minor_version_, + qd->byte_order (), + qd->major_version (), + qd->minor_version (), this->orb_core_); // We know we have some reply message. Check whether it is a @@ -726,7 +726,7 @@ TAO_GIOP_Message_Base::process_reply_message ( // loose ownership of the data_block. int retval = 0; - switch (qd->msg_type_) + switch (qd->msg_type ()) { case TAO_PLUGGABLE_MESSAGE_REPLY: // Should be taken care by the state specific parsing @@ -1526,8 +1526,8 @@ TAO_GIOP_Message_Base::is_ready_for_bidirectional (TAO_OutputCDR &msg) { // Get a parser for us TAO_GIOP_Message_Generator_Parser *parser = 0; - - CORBA::Octet major = 0, minor = 0; + CORBA::Octet major = 0; + CORBA::Octet minor = 0; msg.get_version (major, minor); @@ -1595,18 +1595,6 @@ TAO_GIOP_Message_Base::fragment_header_length (CORBA::Octet major, return generator_parser->fragment_header_length (); } -void -TAO_GIOP_Message_Base::init_queued_data ( - TAO_Queued_Data* qd, - const TAO_GIOP_Message_State& state) const -{ - qd->byte_order_ = state.byte_order (); - qd->major_version_ = state.giop_version ().major; - qd->minor_version_ = state.giop_version ().minor; - qd->more_fragments_ = state.more_fragments (); - qd->msg_type_ = state.message_type (); -} - int TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, CORBA::ULong &request_id) const @@ -1615,13 +1603,13 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, TAO_GIOP_Message_Generator_Parser *generator_parser = 0; // Get the state information that we need to use - this->set_state (qd->major_version_, - qd->minor_version_, + this->set_state (qd->major_version (), + qd->minor_version (), generator_parser); // Get the read and write positions before we steal data. - size_t rd_pos = qd->msg_block_->rd_ptr () - qd->msg_block_->base (); - size_t wr_pos = qd->msg_block_->wr_ptr () - qd->msg_block_->base (); + size_t rd_pos = qd->msg_block ()->rd_ptr () - qd->msg_block ()->base (); + size_t wr_pos = qd->msg_block ()->wr_ptr () - qd->msg_block ()->base (); rd_pos += TAO_GIOP_MESSAGE_HEADER_LEN; // Create a input CDR stream. We do the following @@ -1638,62 +1626,69 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, ACE_Data_Block *db = 0; // Get the flag in the message block - flg = qd->msg_block_->self_flags (); + flg = qd->msg_block ()->self_flags (); if (ACE_BIT_ENABLED (flg, ACE_Message_Block::DONT_DELETE)) { // Use the same datablock - db = qd->msg_block_->data_block (); + db = qd->msg_block ()->data_block (); } else { // Use a duplicated datablock as the datablock has come off the // heap. - db = qd->msg_block_->data_block ()->duplicate (); + db = qd->msg_block ()->data_block ()->duplicate (); } TAO_InputCDR input_cdr (db, flg, rd_pos, wr_pos, - qd->byte_order_, - qd->major_version_, - qd->minor_version_, + qd->byte_order (), + qd->major_version (), + qd->minor_version (), this->orb_core_); - if (qd->major_version_ == 1 && - (qd->minor_version_ == 0 || qd->minor_version_ == 1)) + if (qd->major_version () == 1 && + (qd->minor_version () == 0 || qd->minor_version () == 1)) { - if (qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_REQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_REPLY) - { - IOP::ServiceContextList service_context; + switch (qd->msg_type ()) + { + case TAO_PLUGGABLE_MESSAGE_REQUEST: + case TAO_PLUGGABLE_MESSAGE_REPLY: + { + IOP::ServiceContextList service_context; - if ((input_cdr >> service_context) - && (input_cdr >> request_id)) - { - return 0; - } - } - else if (qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_CANCELREQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY) - { - if ((input_cdr >> request_id)) - { - return 0; - } - } + if ((input_cdr >> service_context) + && (input_cdr >> request_id)) + { + return 0; + } + } + break; + case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: + case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: + case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: + { + if ((input_cdr >> request_id)) + { + return 0; + } + } + break; + } } else { - if (qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_REQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_REPLY || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_FRAGMENT || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_CANCELREQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST || - qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY) + switch (qd->msg_type ()) + { + case TAO_PLUGGABLE_MESSAGE_REQUEST: + case TAO_PLUGGABLE_MESSAGE_REPLY: + case TAO_PLUGGABLE_MESSAGE_FRAGMENT: + case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: + case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: + case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: { // Dealing with GIOP-1.2, the request-id is located directly // behind the GIOP-Header. This is true for all message @@ -1704,6 +1699,8 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd, return 0; } } + break; + } } return -1; @@ -1730,14 +1727,14 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( return -1; } - if (qd->major_version_ == 1 && qd->minor_version_ == 0) + if (qd->major_version () == 1 && qd->minor_version () == 0) { TAO_Queued_Data::release (qd); return -1; // error: GIOP-1.0 does not support fragments } // If this is not the last fragment, push it onto stack for later processing - if (qd->more_fragments_) + if (qd->more_fragments ()) { this->fragment_stack_.push (qd); @@ -1749,12 +1746,12 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( // Add the current message block to the end of the chain // after adjusting the read pointer to skip the header(s) - const size_t header_adjustment = + size_t const header_adjustment = this->header_length () + - this->fragment_header_length (tail->major_version_, - tail->minor_version_); + this->fragment_header_length (tail->major_version (), + tail->minor_version ()); - if (tail->msg_block_->length () < header_adjustment) + if (tail->msg_block ()->length () < header_adjustment) { // buffer length not sufficient TAO_Queued_Data::release (qd); @@ -1762,23 +1759,23 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( } // duplicate code to speed up both processes, for GIOP-1.1 and GIOP-1.2 - if (tail->major_version_ == 1 && tail->minor_version_ == 1) + if (tail->major_version () == 1 && tail->minor_version () == 1) { // GIOP-1.1 while (this->fragment_stack_.pop (head) != -1) { - if (head->more_fragments_ && - head->major_version_ == 1 && - head->minor_version_ == 1 && - head->msg_block_->length () >= header_adjustment) + if (head->more_fragments () && + head->major_version () == 1 && + head->minor_version () == 1 && + head->msg_block ()->length () >= header_adjustment) { // adjust the read-pointer, skip the fragment header - tail->msg_block_->rd_ptr(header_adjustment); + tail->msg_block ()->rd_ptr(header_adjustment); - head->msg_block_->cont (tail->msg_block_); + head->msg_block ()->cont (tail->msg_block ()); - tail->msg_block_ = 0; + tail->msg_block (0); TAO_Queued_Data::release (tail); @@ -1807,19 +1804,19 @@ TAO_GIOP_Message_Base::consolidate_fragmented_message ( CORBA::ULong head_request_id = 0; int parse_status = 0; - if (head->more_fragments_ && - head->major_version_ >= 1 && - head->minor_version_ >= 2 && - head->msg_block_->length () >= header_adjustment && + if (head->more_fragments () && + head->major_version () >= 1 && + head->minor_version () >= 2 && + head->msg_block ()->length () >= header_adjustment && (parse_status = this->parse_request_id (head, head_request_id)) != -1 && request_id == head_request_id) { // adjust the read-pointer, skip the fragment header - tail->msg_block_->rd_ptr(header_adjustment); + tail->msg_block ()->rd_ptr(header_adjustment); - head->msg_block_->cont (tail->msg_block_); + head->msg_block ()->cont (tail->msg_block ()); - tail->msg_block_ = 0; + tail->msg_block (0); TAO_Queued_Data::release (tail); @@ -1893,23 +1890,23 @@ TAO_GIOP_Message_Base::discard_fragmented_message (const TAO_Queued_Data *cancel { CORBA::ULong head_request_id; - if (head->major_version_ == 1 && - head->minor_version_ <= 1 && - head->msg_type_ != TAO_PLUGGABLE_MESSAGE_FRAGMENT && // GIOP11 fragment does not provide request id + if (head->major_version () == 1 && + head->minor_version () <= 1 && + head->msg_type () != TAO_PLUGGABLE_MESSAGE_FRAGMENT && // GIOP11 fragment does not provide request id this->parse_request_id (head, head_request_id) >= 0 && cancel_request_id == head_request_id) { TAO_Queued_Data::release (head); discard_all_GIOP11_messages = true; } - else if (head->major_version_ == 1 && - head->minor_version_ <= 1 && + else if (head->major_version () == 1 && + head->minor_version () <= 1 && discard_all_GIOP11_messages) { TAO_Queued_Data::release (head); } - else if (head->major_version_ >= 1 && - head->minor_version_ >= 2 && + else if (head->major_version () >= 1 && + head->minor_version () >= 2 && this->parse_request_id (head, head_request_id) >= 0 && cancel_request_id == head_request_id) { diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index 48af8ea2fb7..e00f99519ab 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -229,11 +229,6 @@ protected: /// node of size @a sz. TAO_Queued_Data *make_queued_data (size_t sz); - /// Initialize the TAO_Queued_Data from the relevant portions of - /// a GIOP_Message_State. - void init_queued_data (TAO_Queued_Data* qd, - const TAO_GIOP_Message_State& state) const; - private: /// Parse GIOP request-id of TAO_Queued_Data @a qd /// @return 0 on success, otherwise -1 diff --git a/TAO/tao/Incoming_Message_Queue.cpp b/TAO/tao/Incoming_Message_Queue.cpp index 4b535e4eb4f..4c236a96c42 100644 --- a/TAO/tao/Incoming_Message_Queue.cpp +++ b/TAO/tao/Incoming_Message_Queue.cpp @@ -37,10 +37,10 @@ TAO_Incoming_Message_Queue::dequeue_head (void) return 0; // Get the node on the head of the queue... - TAO_Queued_Data * const head = this->last_added_->next_; + TAO_Queued_Data * const head = this->last_added_->next (); // Reset the head node.. - this->last_added_->next_ = head->next_; + this->last_added_->next (head->next ()); // Decrease the size and reset last_added_ if empty if (--this->size_ == 0) @@ -58,15 +58,15 @@ TAO_Incoming_Message_Queue::dequeue_tail (void) // Get the node on the head of the queue... TAO_Queued_Data *head = - this->last_added_->next_; + this->last_added_->next (); - while (head->next_ != this->last_added_) + while (head->next () != this->last_added_) { - head = head->next_; + head = head->next (); } // Put the head in tmp. - head->next_ = this->last_added_->next_; + head->next (this->last_added_->next ()); TAO_Queued_Data *ret_qd = this->last_added_; @@ -85,12 +85,12 @@ TAO_Incoming_Message_Queue::enqueue_tail (TAO_Queued_Data *nd) if (this->size_ == 0) { this->last_added_ = nd; - this->last_added_->next_ = this->last_added_; + this->last_added_->next (this->last_added_); } else { - nd->next_ = this->last_added_->next_; - this->last_added_->next_ = nd; + nd->next (this->last_added_->next ()); + this->last_added_->next (nd); this->last_added_ = nd; } diff --git a/TAO/tao/Incoming_Message_Stack.inl b/TAO/tao/Incoming_Message_Stack.inl index 838332a0fb3..a692e071b92 100644 --- a/TAO/tao/Incoming_Message_Stack.inl +++ b/TAO/tao/Incoming_Message_Stack.inl @@ -30,7 +30,7 @@ Incoming_Message_Stack::~Incoming_Message_Stack() ACE_INLINE void Incoming_Message_Stack::push(TAO_Queued_Data *data) { - data->next_ = this->top_; + data->next (this->top_); this->top_ = data; } @@ -43,7 +43,7 @@ Incoming_Message_Stack::pop (TAO_Queued_Data* &data) return -1; data = this->top_; - this->top_ = data->next_; + this->top_ = data->next (); return 0; } diff --git a/TAO/tao/Queued_Data.h b/TAO/tao/Queued_Data.h index 1cb65b81dd8..3d196caad3d 100644 --- a/TAO/tao/Queued_Data.h +++ b/TAO/tao/Queued_Data.h @@ -16,6 +16,7 @@ #include /**/ "ace/pre.h" #include "tao/Pluggable_Messaging_Utils.h" +#include "tao/GIOP_Message_State.h" #include "ace/Message_Block.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) @@ -72,7 +73,43 @@ public: /// @return -1 if consolidation failed, eg out or memory, otherwise 0 int consolidate (void); -public: + /// Get missing data + size_t missing_data (void) const; + + /// Set missing data + void missing_data (size_t data); + + /// Get major version + CORBA::Octet major_version (void) const; + + /// Get minor version + CORBA::Octet minor_version (void) const; + + /// Get byte_order + CORBA::Octet byte_order (void) const; + + /// Get more fragments + CORBA::Octet more_fragments (void) const; + + /// Get message type + TAO_Pluggable_Message_Type msg_type (void) const; + + /// Get next + TAO_Queued_Data *next (void) const; + + /// Set next + void next (TAO_Queued_Data* qd); + + /// Get message block + ACE_Message_Block *msg_block (void) const; + + /// Set message block + void msg_block (ACE_Message_Block *mb); + + + void set_state (const TAO_GIOP_Message_State& state); + +private: /// The message block that contains the message. ACE_Message_Block *msg_block_; @@ -111,13 +148,10 @@ public: /// Pounter to the next element in the queue. TAO_Queued_Data *next_; -private: /// Replace the datablock with a one allocated on the heap or /// allocator static void replace_data_block (ACE_Message_Block &mb); -private: - /// The allocator used to allocate this class. ACE_Allocator *allocator_; }; diff --git a/TAO/tao/Queued_Data.inl b/TAO/tao/Queued_Data.inl index 67b3cd89f4c..e3e20a7b0a6 100644 --- a/TAO/tao/Queued_Data.inl +++ b/TAO/tao/Queued_Data.inl @@ -30,4 +30,80 @@ TAO_Queued_Data::replace_data_block (ACE_Message_Block &mb) mb.clr_self_flags (ACE_Message_Block::DONT_DELETE); } +ACE_INLINE size_t +TAO_Queued_Data::missing_data (void) const +{ + return this->missing_data_; +} + +ACE_INLINE void +TAO_Queued_Data::missing_data (size_t data) +{ + this->missing_data_ = data; +} + +ACE_INLINE CORBA::Octet +TAO_Queued_Data::major_version (void) const +{ + return this->major_version_; +} + +ACE_INLINE CORBA::Octet +TAO_Queued_Data::minor_version (void) const +{ + return this->minor_version_; +} + +ACE_INLINE CORBA::Octet +TAO_Queued_Data::byte_order (void) const +{ + return this->byte_order_; +} + +ACE_INLINE CORBA::Octet +TAO_Queued_Data::more_fragments (void) const +{ + return this->more_fragments_; +} + +ACE_INLINE TAO_Pluggable_Message_Type +TAO_Queued_Data::msg_type (void) const +{ + return this->msg_type_; +} + +ACE_INLINE TAO_Queued_Data * +TAO_Queued_Data::next (void) const +{ + return this->next_; +} + +ACE_INLINE void +TAO_Queued_Data::next (TAO_Queued_Data* qd) +{ + this->next_ = qd; +} + +ACE_INLINE ACE_Message_Block * +TAO_Queued_Data::msg_block (void) const +{ + return this->msg_block_; +} + +ACE_INLINE void +TAO_Queued_Data::msg_block (ACE_Message_Block *mb) +{ + this->msg_block_ = mb; +} + +ACE_INLINE void +TAO_Queued_Data::set_state (const TAO_GIOP_Message_State& state) +{ + this->byte_order_ = state.byte_order (); + this->major_version_ = state.giop_version ().major; + this->minor_version_ = state.giop_version ().minor; + this->more_fragments_ = state.more_fragments (); + this->msg_type_ = state.message_type (); +} + TAO_END_VERSIONED_NAMESPACE_DECL diff --git a/TAO/tao/Queued_Message.h b/TAO/tao/Queued_Message.h index 22f24e04f6f..051d71d6e2a 100644 --- a/TAO/tao/Queued_Message.h +++ b/TAO/tao/Queued_Message.h @@ -109,22 +109,22 @@ public: */ //@{ /// Set/get the next element in the list - virtual TAO_Queued_Message *next (void) const; + TAO_Queued_Message *next (void) const; /// Set/get the previous element in the list - virtual TAO_Queued_Message *prev (void) const; + TAO_Queued_Message *prev (void) const; /// Remove this element from the list - virtual void remove_from_list (TAO_Queued_Message *&head, - TAO_Queued_Message *&tail); + void remove_from_list (TAO_Queued_Message *&head, + TAO_Queued_Message *&tail); /// Insert the current element at the tail of the queue. - virtual void push_back (TAO_Queued_Message *&head, - TAO_Queued_Message *&tail); + void push_back (TAO_Queued_Message *&head, + TAO_Queued_Message *&tail); /// Insert the current element at the head of the queue. - virtual void push_front (TAO_Queued_Message *&head, - TAO_Queued_Message *&tail); + void push_front (TAO_Queued_Message *&head, + TAO_Queued_Message *&tail); //@} /** @name Template Methods @@ -195,11 +195,11 @@ public: * a pool), they need to be reclaimed explicitly. */ virtual void destroy (void) = 0; - + /// Check for timeout /** * @param now Pass in the current time using - * ACE_High_Res_Timer::gettimeofday_hr(). + * ACE_High_Res_Timer::gettimeofday_hr(). * This is a parameter in order to avoid calling gettimeofday_hr() inside * of this method (which will be called in a tight loop). * @return true if the relative roundtrip timeout has expired. diff --git a/TAO/tao/Strategies/DIOP_Transport.cpp b/TAO/tao/Strategies/DIOP_Transport.cpp index 96576104b2e..e38394f7776 100644 --- a/TAO/tao/Strategies/DIOP_Transport.cpp +++ b/TAO/tao/Strategies/DIOP_Transport.cpp @@ -209,7 +209,7 @@ TAO_DIOP_Transport::handle_input (TAO_Resume_Handle &rh, mesg_length) == -1) return -1; - if (qd.missing_data_ == TAO_MISSING_DATA_UNDEFINED) + if (qd.missing_data () == TAO_MISSING_DATA_UNDEFINED) { // parse/marshal error return -1; diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp index f5d009a8587..9c435053d31 100644 --- a/TAO/tao/Strategies/SHMIOP_Transport.cpp +++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp @@ -214,7 +214,7 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, mesg_length) == -1) return -1; - if (qd.missing_data_ == TAO_MISSING_DATA_UNDEFINED) + if (qd.missing_data () == TAO_MISSING_DATA_UNDEFINED) { // parse/marshal error happened return -1; @@ -226,13 +226,13 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, return -1; } - if (message_block.space () < qd.missing_data_) + if (message_block.space () < qd.missing_data ()) { - const size_t message_size = message_block.length () - + qd.missing_data_; + size_t const message_size = message_block.length () + + qd.missing_data (); // reallocate buffer with correct size on heap - if (ACE_CDR::grow (&message_block, message_size) == -1) + if (ACE_CDR::grow (&message_block, message_size) == -1) { if (TAO_debug_level > 0) { @@ -248,7 +248,7 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, // As this used for transports where things are available in one // shot this looping should not create any problems. - for (size_t n = qd.missing_data_; + for (size_t n = qd.missing_data (); n != 0; n -= bytes) { @@ -261,7 +261,7 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, // argument that can be said against this is that, this is the // bad layer in which this is being done ie. recv_n is // simulated. But... - bytes = this->recv (message_block.wr_ptr (), + bytes = this->recv (message_block.wr_ptr (), n, max_wait_time); @@ -271,11 +271,10 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, return -1; } - message_block.wr_ptr (bytes); - + message_block.wr_ptr (bytes); } - qd.missing_data_ = 0; + qd.missing_data (0); // Now we have a full message in our buffer. Just go ahead and // process that @@ -291,10 +290,10 @@ TAO_SHMIOP_Transport::handle_input (TAO_Resume_Handle &rh, int TAO_SHMIOP_Transport::send_request (TAO_Stub *stub, - TAO_ORB_Core *orb_core, - TAO_OutputCDR &stream, - int message_semantics, - ACE_Time_Value *max_wait_time) + TAO_ORB_Core *orb_core, + TAO_OutputCDR &stream, + int message_semantics, + ACE_Time_Value *max_wait_time) { if (this->ws_->sending_request (orb_core, message_semantics) == -1) diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 90cc6f24465..5f2b0dc1cf4 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -1483,7 +1483,7 @@ TAO_Transport::handle_input (TAO_Resume_Handle &rh, TAO_Queued_Data *q_data = 0; if (this->incoming_message_stack_.top (q_data) != -1 - && q_data->missing_data_ != TAO_MISSING_DATA_UNDEFINED) + && q_data->missing_data () != TAO_MISSING_DATA_UNDEFINED) { /* PRE: q_data->missing_data_ > 0 as all QD on stack must be incomplete */ if (this->handle_input_missing_data (rh, max_wait_time, q_data) == -1) @@ -1521,7 +1521,7 @@ TAO_Transport::consolidate_process_message (TAO_Queued_Data *q_data, TAO_Resume_Handle &rh) { // paranoid check - if (q_data->missing_data_ != 0) + if (q_data->missing_data () != 0) { if (TAO_debug_level > 0) { @@ -1533,8 +1533,8 @@ TAO_Transport::consolidate_process_message (TAO_Queued_Data *q_data, return -1; } - if (q_data->more_fragments_ || - q_data->msg_type_ == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + if (q_data->more_fragments () || + q_data->msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) { // consolidate message on top of stack, only for fragmented messages TAO_Queued_Data *new_q_data = 0; @@ -1609,13 +1609,13 @@ TAO_Transport::consolidate_enqueue_message (TAO_Queued_Data *q_data) // consolidate message on top of stack, only for fragmented messages // paranoid check - if (q_data->missing_data_ != 0) + if (q_data->missing_data () != 0) { return -1; } - if (q_data->more_fragments_ || - q_data->msg_type_ == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + if (q_data->more_fragments () || + q_data->msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) { TAO_Queued_Data *new_q_data = 0; @@ -1676,18 +1676,17 @@ TAO_Transport::handle_input_missing_data (TAO_Resume_Handle &rh, ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - Transport[%d]::handle_input_missing_data_message, ") ACE_TEXT ("enter (missing data == %d)\n"), - this->id (), q_data->missing_data_)); + this->id (), q_data->missing_data ())); } - size_t const recv_size = q_data->missing_data_; + size_t const recv_size = q_data->missing_data (); - // make sure the message_block has enough space - size_t const message_size = recv_size - + q_data->msg_block_->length(); - - if (q_data->msg_block_->space() < recv_size) + if (q_data->msg_block ()->space() < recv_size) { - if (ACE_CDR::grow (q_data->msg_block_, message_size) == -1) + // make sure the message_block has enough space + size_t const message_size = recv_size + q_data->msg_block ()->length(); + + if (ACE_CDR::grow (q_data->msg_block (), message_size) == -1) { return -1; } @@ -1701,7 +1700,7 @@ TAO_Transport::handle_input_missing_data (TAO_Resume_Handle &rh, this->recv_buffer_size_ = recv_size; // Read the message into the existing message block on heap - ssize_t const n = this->recv (q_data->msg_block_->wr_ptr(), + ssize_t const n = this->recv (q_data->msg_block ()->wr_ptr(), recv_size, max_wait_time); @@ -1719,10 +1718,10 @@ TAO_Transport::handle_input_missing_data (TAO_Resume_Handle &rh, this->id (), n)); } - q_data->msg_block_->wr_ptr(n); - q_data->missing_data_ -= n; + q_data->msg_block ()->wr_ptr(n); + q_data->missing_data (q_data->missing_data () - n); - if (q_data->missing_data_ == 0) + if (q_data->missing_data () == 0) { // paranoid check if (this->incoming_message_stack_.pop (q_data) == -1) @@ -1759,7 +1758,7 @@ TAO_Transport::handle_input_parse_extra_messages (ACE_Message_Block &message_blo (message_block, q_data)) != -1 && q_data != 0) // paranoid check { - if (q_data->missing_data_ == 0) + if (q_data->missing_data () == 0) { if (this->consolidate_enqueue_message (q_data) == -1) { @@ -1856,12 +1855,12 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // consolidated. Otherwise we are in new cycle, reading complete // GIOP header of new incoming message. if (this->incoming_message_stack_.top (q_data) != -1 - && q_data->missing_data_ == TAO_MISSING_DATA_UNDEFINED) + && q_data->missing_data () == TAO_MISSING_DATA_UNDEFINED) { // There is a partial message on incoming_message_stack_ // whose length is unknown so far. We need to consolidate // the GIOP header to get to know the payload size, - recv_size = header_length - q_data->msg_block_->length (); + recv_size = header_length - q_data->msg_block ()->length (); } else { @@ -1951,7 +1950,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // PRE: data in buffer is aligned && message_block.length() > 0 if (this->incoming_message_stack_.top (q_data) != -1 - && q_data->missing_data_ == TAO_MISSING_DATA_UNDEFINED) + && q_data->missing_data () == TAO_MISSING_DATA_UNDEFINED) { // // MESSAGE CONSOLIDATION @@ -1977,7 +1976,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, } // Complete message are to be enqueued and later processed - if (q_data->missing_data_ == 0) + if (q_data->missing_data () == 0) { if (this->incoming_message_stack_.pop (q_data) == -1) { @@ -2021,7 +2020,7 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, if (this->messaging_object ()->parse_next_message (message_block, qd, mesg_length) == -1 - || (qd.missing_data_ == 0 + || (qd.missing_data () == 0 && mesg_length > message_block.length ()) ) { // extracting message failed @@ -2030,11 +2029,11 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, // POST: qd.missing_data_ == 0 --> mesg_length <= message_block.length() // This prevents seeking rd_ptr behind the wr_ptr - if (qd.missing_data_ != 0 || - qd.more_fragments_ || - qd.msg_type_ == TAO_PLUGGABLE_MESSAGE_FRAGMENT) + if (qd.missing_data () != 0 || + qd.more_fragments () || + qd.msg_type () == TAO_PLUGGABLE_MESSAGE_FRAGMENT) { - if (qd.missing_data_ == 0) + if (qd.missing_data () == 0) { // Dealing with a fragment TAO_Queued_Data *nqd = @@ -2046,9 +2045,9 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, } // mark the end of message in new buffer - char* end_mark = nqd->msg_block_->rd_ptr () + char* end_mark = nqd->msg_block ()->rd_ptr () + mesg_length; - nqd->msg_block_->wr_ptr (end_mark); + nqd->msg_block ()->wr_ptr (end_mark); // move the read pointer forward in old buffer message_block.rd_ptr (mesg_length); @@ -2071,17 +2070,17 @@ TAO_Transport::handle_input_parse_data (TAO_Resume_Handle &rh, return -1; } } - else if (qd.missing_data_ != TAO_MISSING_DATA_UNDEFINED) + else if (qd.missing_data () != TAO_MISSING_DATA_UNDEFINED) { // Incomplete message, must be the last one in buffer - if (qd.missing_data_ != TAO_MISSING_DATA_UNDEFINED && - qd.missing_data_ > message_block.space ()) + if (qd.missing_data () != TAO_MISSING_DATA_UNDEFINED && + qd.missing_data () > message_block.space ()) { // Re-Allocate correct size on heap - if (ACE_CDR::grow (qd.msg_block_, + if (ACE_CDR::grow (qd.msg_block (), message_block.length () - + qd.missing_data_) == -1) + + qd.missing_data ()) == -1) { return -1; } @@ -2222,19 +2221,18 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("TAO (%P|%t) - Transport[%d]::process_parsed_messages, ") ACE_TEXT ("entering (missing data == %d)\n"), - this->id(), qd->missing_data_)); + this->id(), qd->missing_data ())); } - // Get the <message_type> that we have received - TAO_Pluggable_Message_Type const t = qd->msg_type_; - #if TAO_HAS_TRANSPORT_CURRENT == 1 // Update stats, if any if (this->stats_ != 0) this->stats_->messages_received (qd->msg_block_->length ()); #endif /* TAO_HAS_TRANSPORT_CURRENT == 1 */ - if (t == TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION) + switch (qd->msg_type ()) + { + case TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION: { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -2246,8 +2244,9 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, // closing connection and the necessary memory management. return -1; } - else if (t == TAO_PLUGGABLE_MESSAGE_REQUEST || - t == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST) + break; + case TAO_PLUGGABLE_MESSAGE_REQUEST: + case TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST: { // Let us resume the handle before we go ahead to process the // request. This will open up the handle for other threads. @@ -2262,8 +2261,9 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, return -1; } } - else if (t == TAO_PLUGGABLE_MESSAGE_REPLY || - t == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY) + break; + case TAO_PLUGGABLE_MESSAGE_REPLY: + case TAO_PLUGGABLE_MESSAGE_LOCATEREPLY: { rh.resume_handle (); @@ -2282,7 +2282,8 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, } } - else if (t == TAO_PLUGGABLE_MESSAGE_CANCELREQUEST) + break; + case TAO_PLUGGABLE_MESSAGE_CANCELREQUEST: { // The associated request might be incomplpete residing // fragmented in messaging object. We must make sure the @@ -2306,7 +2307,8 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, // Just continue processing, CancelRequest does not mean to cut // off the connection. } - else if (t == TAO_PLUGGABLE_MESSAGE_MESSAGERROR) + break; + case TAO_PLUGGABLE_MESSAGE_MESSAGERROR: { if (TAO_debug_level > 0) { @@ -2317,6 +2319,8 @@ TAO_Transport::process_parsed_messages (TAO_Queued_Data *qd, } return -1; } + break; + } // If not, just return back.. return 0; |