summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2000-12-28 23:09:53 +0000
committerbala <balanatarajan@users.noreply.github.com>2000-12-28 23:09:53 +0000
commit128ae0d08cdbfed47b3b5a6077bb7ac91319ec1b (patch)
treeab5f57be13361904ea601aa85fb84b1739f506ac
parentd5f48cf4388612ee5128aaefbb5722b2b1c26195 (diff)
downloadATCD-128ae0d08cdbfed47b3b5a6077bb7ac91319ec1b.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp36
-rw-r--r--TAO/tao/GIOP_Message_Handler.cpp6
-rw-r--r--TAO/tao/things_that_needs3
3 files changed, 31 insertions, 14 deletions
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 8245e818ddb..5232776bb4b 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -325,17 +325,22 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport,
// same Event_Handler in two threads at the same time.
/************************************************************/
+ // Create a message block by stealing the data block
+ ACE_Message_Block msg_block (this->message_handler_.data_block_dup ());
+
+ // Move the wr_ptr () and rd_ptr in the message block. This is not
+ // generally required as we are not going to write anything. But
+ // this is *important* for checking the length of the CDR streams
+ size_t n = this->message_handler_.message_state ().message_size;
+ msg_block.wr_ptr (n + TAO_GIOP_MESSAGE_HEADER_LEN);
+ msg_block.rd_ptr (TAO_GIOP_MESSAGE_HEADER_LEN);
+
// Steal the input CDR from the message block
- TAO_InputCDR input_cdr (this->message_handler_.data_block_dup (),
+ TAO_InputCDR input_cdr (&msg_block,
this->message_handler_.message_state ().byte_order,
orb_core);
- // When the data block is used for creating the CDR stream, we loose
- // track of the read pointer of the message block in the message
- // handler.
- input_cdr.skip_bytes (TAO_GIOP_MESSAGE_HEADER_LEN);
-
// Send the message state for the service layer like FT to log the
// messages
// @@@ Needed for DOORS
@@ -345,7 +350,6 @@ TAO_GIOP_Message_Base::process_request_message (TAO_Transport *transport,
this->message_handler_.reset (0);
- int retval = 0;
// We know we have some request message. Check whether it is a
// GIOP_REQUEST or GIOP_LOCATE_REQUEST to take action.
switch (this->message_handler_.message_state ().message_type)
@@ -372,15 +376,20 @@ TAO_GIOP_Message_Base::process_reply_message (
TAO_Pluggable_Reply_Params &params
)
{
+ // Create a message block by stealing the data block
+ ACE_Message_Block msg_block (this->message_handler_.data_block_dup ());
+
+ // Move the wr_ptr () and rd_ptr in the message block. This is not
+ // generally required as we are not going to write anything. But
+ // this is *important* for checking the length of the CDR streams
+ size_t n = this->message_handler_.message_state ().message_size;
+ msg_block.wr_ptr (n + TAO_GIOP_MESSAGE_HEADER_LEN);
+ msg_block.rd_ptr (TAO_GIOP_MESSAGE_HEADER_LEN);
+
// Steal the input CDR from the message block
- TAO_InputCDR input_cdr (this->message_handler_.data_block_dup (),
+ TAO_InputCDR input_cdr (&msg_block,
this->message_handler_.message_state ().byte_order);
- // When the data block is used for creating the CDR stream, we loose
- // track of the read pointer of the message block in the message
- // handler.
- input_cdr.skip_bytes (TAO_GIOP_MESSAGE_HEADER_LEN);
-
// Reset the message state. Now, we are ready for the next nested
// upcall if any.
this->message_handler_.reset (0);
@@ -518,6 +527,7 @@ TAO_GIOP_Message_Base::process_request (TAO_Transport *transport,
CORBA::Object_var forward_to;
+
// Do this before the reply is sent.
orb_core->adapter_registry ()->dispatch (request.object_key (),
request,
diff --git a/TAO/tao/GIOP_Message_Handler.cpp b/TAO/tao/GIOP_Message_Handler.cpp
index d8ede5ab8d4..41f748f53fb 100644
--- a/TAO/tao/GIOP_Message_Handler.cpp
+++ b/TAO/tao/GIOP_Message_Handler.cpp
@@ -20,7 +20,11 @@ ACE_RCSID(tao, GIOP_Message_Handler, "$Id$")
TAO_GIOP_Message_Handler::TAO_GIOP_Message_Handler (TAO_ORB_Core * orb_core)
: message_status_ (TAO_GIOP_WAITING_FOR_HEADER),
message_size_ (ACE_CDR::DEFAULT_BUFSIZE),
- current_buffer_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE)),
+ current_buffer_ (ACE_CDR::DEFAULT_BUFSIZE),
+ // @@ This doesn't seem to work. The problem comes when we extract
+ // data portion from this buffer in the skeleton. Why?? Needs
+ // investigation.
+ //current_buffer_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE)),
message_state_ (orb_core)
{
}
diff --git a/TAO/tao/things_that_needs b/TAO/tao/things_that_needs
index 9e8267e520a..2bac15b7a46 100644
--- a/TAO/tao/things_that_needs
+++ b/TAO/tao/things_that_needs
@@ -1,2 +1,5 @@
- Fragmentation
- Mutliple message reads
+- Why does the rd_ptr () not align when
+ we use a cdr allocator from ORB_Core??
+