diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-01-09 12:01:48 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-01-09 12:01:48 +0000 |
commit | 2d99840d6c00a10f2ad785568edb46bc24a49d76 (patch) | |
tree | 71aa9b1ea0a56db0b28a91fe99fc4738858b95c2 | |
parent | 277bc65ace65ea7067a1dc26179b230cdd00278b (diff) | |
download | ATCD-2d99840d6c00a10f2ad785568edb46bc24a49d76.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.cpp | 47 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.h | 7 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.h | 3 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_State.i | 4 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 12 | ||||
-rw-r--r-- | TAO/tao/IIOP_Transport.h | 5 | ||||
-rw-r--r-- | TAO/tao/Pluggable.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/Pluggable.h | 6 | ||||
-rw-r--r-- | TAO/tao/Pluggable.i | 10 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging.h | 2 | ||||
-rw-r--r-- | TAO/tao/Strategies/UIOP_Transport.cpp | 1 | ||||
-rw-r--r-- | TAO/tao/TAO.dsp | 19 |
14 files changed, 77 insertions, 50 deletions
diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp index cc3fad61e14..91f7fe69117 100644 --- a/TAO/tao/GIOP_Message_Lite.cpp +++ b/TAO/tao/GIOP_Message_Lite.cpp @@ -27,7 +27,11 @@ TAO_GIOP_Message_Lite::TAO_GIOP_Message_Lite (TAO_ORB_Core *orb_core) ), cdr_dblock_alloc_ ( orb_core->resource_factory ()->output_cdr_dblock_allocator () - ) + ), + input_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + TAO_ENCAP_BYTE_ORDER, + orb_core), + current_offset_ (0) { #if defined (ACE_HAS_PURIFY) (void) ACE_OS::memset (this->repbuf_, @@ -74,7 +78,7 @@ int TAO_GIOP_Message_Lite::parse_header (void) { // Get the read pointer - char *buf = this->message_state_.cdr.rd_ptr (); + char *buf = this->input_cdr_.rd_ptr (); // @@ Bala: i added the following comment, does it make sense? // In GIOPLite the version, byte order info, etc. are hardcoded, and @@ -86,10 +90,10 @@ TAO_GIOP_Message_Lite::parse_header (void) // Get the message type. this->message_state_.message_type = buf[TAO_GIOP_LITE_MESSAGE_TYPE_OFFSET]; - this->message_state_.cdr.reset_byte_order (this->message_state_.byte_order); + this->input_cdr_.reset_byte_order (this->message_state_.byte_order); // The first bytes are the length of the message. - this->message_state_.cdr.read_ulong (this->message_state_.message_size); + this->input_cdr_.read_ulong (this->message_state_.message_size); return 0; } @@ -101,6 +105,8 @@ TAO_GIOP_Message_Lite::reset (int reset_flag) // Reset the message state this->message_state_.reset (reset_flag); + if (reset_flag) + this->input_cdr_.reset_contents (); //What else??? } @@ -211,7 +217,7 @@ TAO_GIOP_Message_Lite::read_message (TAO_Transport *transport, { int retval = TAO_GIOP_Utils::read_bytes_input (transport, - message_state_.cdr, + this->input_cdr_, TAO_GIOP_LITE_HEADER_LEN , max_wait_time); if (retval == -1) @@ -237,8 +243,8 @@ TAO_GIOP_Message_Lite::read_message (TAO_Transport *transport, return -1; } - if (this->message_state_.cdr.grow (TAO_GIOP_LITE_HEADER_LEN + - this->message_state_.message_size) == -1) + if (this->input_cdr_.grow (TAO_GIOP_LITE_HEADER_LEN + + this->message_state_.message_size) == -1) { if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, @@ -250,16 +256,16 @@ TAO_GIOP_Message_Lite::read_message (TAO_Transport *transport, // Growing the buffer may have reset the rd_ptr(), but we want // to leave it just after the GIOP header (that was parsed // already); - this->message_state_.cdr.skip_bytes (TAO_GIOP_LITE_HEADER_LEN); + this->input_cdr_.skip_bytes (TAO_GIOP_LITE_HEADER_LEN); } size_t missing_data = - this->message_state_.message_size - this->message_state_.current_offset; + this->message_state_.message_size - this->current_offset_; ssize_t n = TAO_GIOP_Utils::read_buffer (transport, - this->message_state_.cdr.rd_ptr () - + this->message_state_.current_offset, + this->input_cdr_.rd_ptr () + + this->current_offset_, missing_data, max_wait_time); @@ -280,18 +286,18 @@ TAO_GIOP_Message_Lite::read_message (TAO_Transport *transport, return -1; } - current_offset += n; + this->current_offset_ += n; - if (this->message_state_.current_offset == + if (this->current_offset_ == this->message_state_.message_size) { if (TAO_debug_level >= 4) { size_t header_len = TAO_GIOP_LITE_HEADER_LEN ; - char *buf = this->message_state_.cdr.rd_ptr (); + char *buf = this->input_cdr_.rd_ptr (); buf -= header_len; - size_t msg_len = this->message_state_.cdr.length () + header_len; + size_t msg_len = this->input_cdr_.length () + header_len; this->dump_msg ("recv", ACE_reinterpret_cast (u_char *, buf), @@ -299,7 +305,10 @@ TAO_GIOP_Message_Lite::read_message (TAO_Transport *transport, } } - return 1;//this->message_state_.is_complete (); + if (this->current_offset_ != this->message_state_.message_size) + return 0; + + return 1; } @@ -407,7 +416,7 @@ TAO_GIOP_Message_Lite::process_request_message (TAO_Transport *transport, // same Event_Handler in two threads at the same time. // Steal the input CDR from the message state. - TAO_InputCDR input_cdr (ACE_InputCDR::Transfer_Contents (this->message_state_.cdr), + TAO_InputCDR input_cdr (ACE_InputCDR::Transfer_Contents (this->input_cdr_), orb_core); // Send the message state for the service layer like FT to log the @@ -450,12 +459,12 @@ TAO_GIOP_Message_Lite::process_reply_message ( { case TAO_GIOP_REPLY: // Should be taken care by the state specific parsing - return this->parse_reply (this->message_state_.cdr, + return this->parse_reply (this->input_cdr_, params); case TAO_GIOP_LOCATEREPLY: // We call parse_reply () here because, the message format for // the LOCATEREPLY & REPLY are same. - return this->parse_reply (this->message_state_.cdr, + return this->parse_reply (this->input_cdr_, params); default: return -1; diff --git a/TAO/tao/GIOP_Message_Lite.h b/TAO/tao/GIOP_Message_Lite.h index 1c1dfba8937..921258f6d6d 100644 --- a/TAO/tao/GIOP_Message_Lite.h +++ b/TAO/tao/GIOP_Message_Lite.h @@ -253,6 +253,13 @@ private: /// A buffer that we will use to initialise the CDR stream char repbuf_[ACE_CDR::DEFAULT_BUFSIZE]; + + /// The InputCDR stream in which the incoming messages are + /// read. This will be used to decode the messages. + TAO_InputCDR input_cdr_; + + /// The offset of the write pointer of the input cdr stream + size_t current_offset_; }; diff --git a/TAO/tao/GIOP_Message_State.cpp b/TAO/tao/GIOP_Message_State.cpp index cc6b52f520d..b935b577a90 100644 --- a/TAO/tao/GIOP_Message_State.cpp +++ b/TAO/tao/GIOP_Message_State.cpp @@ -18,9 +18,7 @@ TAO_GIOP_Message_State::TAO_GIOP_Message_State (TAO_ORB_Core* orb_core) message_type (TAO_GIOP_MESSAGERROR), message_size (0), request_id (0), - cdr (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), - TAO_ENCAP_BYTE_ORDER, - orb_core), + // Problem similar to GIOP_Message_handler.cpp - Bala fragmented_messages (ACE_CDR::DEFAULT_BUFSIZE) { diff --git a/TAO/tao/GIOP_Message_State.h b/TAO/tao/GIOP_Message_State.h index 18e1abf2816..336fad01a88 100644 --- a/TAO/tao/GIOP_Message_State.h +++ b/TAO/tao/GIOP_Message_State.h @@ -115,9 +115,6 @@ public: /// Request Id from the Fragment header CORBA::ULong request_id; - /// This is the InputCDR that will be used to decode the message. - TAO_InputCDR cdr; - /** * The fragments are collected in a chain of message blocks (using * the cont() field). When the complete message is received the diff --git a/TAO/tao/GIOP_Message_State.i b/TAO/tao/GIOP_Message_State.i index 38d3ce25ae5..b51ac281369 100644 --- a/TAO/tao/GIOP_Message_State.i +++ b/TAO/tao/GIOP_Message_State.i @@ -68,12 +68,10 @@ TAO_GIOP_Version::operator!= (const TAO_GIOP_Version &src) // ACE_INLINE void -TAO_GIOP_Message_State::reset (int reset_contents) +TAO_GIOP_Message_State::reset (int /*reset_contents*/) { this->message_size = 0; this->more_fragments = 0; - if (reset_contents) - this->cdr.reset_contents (); } ACE_INLINE CORBA::Boolean diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index ac6770dea28..d52971418ae 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -146,18 +146,6 @@ TAO_IIOP_Transport::recv (char *buf, } -ssize_t -TAO_IIOP_Transport::read (char *buf, - size_t len, - const ACE_Time_Value * /*max_wait_time*/) -{ - return ACE::recv (this->handle (), - (void *) buf, - len); -} - - - int TAO_IIOP_Transport::read_process_message (ACE_Time_Value *max_wait_time, int block) diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h index 31b438e4feb..c6c5aa96b74 100644 --- a/TAO/tao/IIOP_Transport.h +++ b/TAO/tao/IIOP_Transport.h @@ -96,11 +96,6 @@ public: size_t len, const ACE_Time_Value *s = 0); - /// Read len bytes from the socket into buf - virtual ssize_t read (char *buf, - size_t len, - const ACE_Time_Value *s = 0); - /// Read and process the message from the connection. The processing /// of the message is done by delegating the work to the underlying /// messaging object diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp index 2b05b53dee7..e556a21cb89 100644 --- a/TAO/tao/Pluggable.cpp +++ b/TAO/tao/Pluggable.cpp @@ -240,6 +240,7 @@ TAO_Transport::leader_follower_condition_variable (void) return this->wait_strategy ()->leader_follower_condition_variable (); } + void TAO_Transport::start_request (TAO_ORB_Core *, TAO_Target_Specification & /*spec */, diff --git a/TAO/tao/Pluggable.h b/TAO/tao/Pluggable.h index dbb60b99db3..7aff0417ff1 100644 --- a/TAO/tao/Pluggable.h +++ b/TAO/tao/Pluggable.h @@ -129,9 +129,9 @@ public: * not clear this this is the best place to specify this. The actual * timeout values will be kept in the Policies. */ - virtual ssize_t read (char *buf, - size_t len, - const ACE_Time_Value *s = 0) = 0; + ssize_t read (char *buf, + size_t len, + const ACE_Time_Value *s = 0); /// Fill into <output> the right headers to make a request. diff --git a/TAO/tao/Pluggable.i b/TAO/tao/Pluggable.i index c5b7092b276..ba23e5ece2f 100644 --- a/TAO/tao/Pluggable.i +++ b/TAO/tao/Pluggable.i @@ -3,9 +3,19 @@ // **************************************************************** +ACE_INLINE ssize_t +TAO_Transport::read (char *buf, + size_t len, + const ACE_Time_Value * /*max_wait_time*/) +{ + return ACE::recv (this->handle (), + (void *) buf, + len); +} // @@ One of the orb_core () methods should be done away. Will visit // @@ this later -- Bala + ACE_INLINE TAO_ORB_Core * TAO_Transport::orb_core (void) const { diff --git a/TAO/tao/Pluggable_Messaging.cpp b/TAO/tao/Pluggable_Messaging.cpp index 33b1e834ed2..0748ca31bf0 100644 --- a/TAO/tao/Pluggable_Messaging.cpp +++ b/TAO/tao/Pluggable_Messaging.cpp @@ -15,3 +15,9 @@ TAO_Pluggable_Messaging::~TAO_Pluggable_Messaging (void) { } + +int +TAO_Pluggable_Messaging::more_messages (void) +{ + ACE_NOTSUP_RETURN (-1); +} diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h index 1d1765f85a4..55d4a903517 100644 --- a/TAO/tao/Pluggable_Messaging.h +++ b/TAO/tao/Pluggable_Messaging.h @@ -141,7 +141,7 @@ public: virtual int is_ready_for_bidirectional (void) = 0; /// Are there any more messages that needs processing? - virtual int more_messages (void) = 0; + virtual int more_messages (void); }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp index 66104a17390..bdecf324f82 100644 --- a/TAO/tao/Strategies/UIOP_Transport.cpp +++ b/TAO/tao/Strategies/UIOP_Transport.cpp @@ -145,7 +145,6 @@ TAO_UIOP_Transport::recv (char *buf, max_wait_time); } - int TAO_UIOP_Transport::read_process_message (ACE_Time_Value *max_wait_time, int block) diff --git a/TAO/tao/TAO.dsp b/TAO/tao/TAO.dsp index b91b5b62ead..9450a5b9cb2 100644 --- a/TAO/tao/TAO.dsp +++ b/TAO/tao/TAO.dsp @@ -1335,6 +1335,25 @@ SOURCE=.\GIOP_Message_Handler.cpp # End Source File
# Begin Source File
+SOURCE=.\GIOP_Message_Lite.cpp
+
+!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Alpha Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 MFC Debug"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Release"
+
+!ELSEIF "$(CFG)" == "TAO DLL - Win32 Debug"
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=.\GIOP_Message_Locate_Header.cpp
!IF "$(CFG)" == "TAO DLL - Win32 Alpha Release"
|