diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-05-01 15:59:42 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2001-05-01 15:59:42 +0000 |
commit | 9a55e9d85a5515c6209c363b6e5761e0528400f5 (patch) | |
tree | 2996398af3752636c9c357ecc337b4307e3e9dff | |
parent | bece42d6bdae7e47b262be709c31d3bd6761c926 (diff) | |
download | ATCD-9a55e9d85a5515c6209c363b6e5761e0528400f5.tar.gz |
ChangeLogTag:Tue May 01 08:50:11 2001 Ossama Othman <ossama@uci.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 24 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Base.cpp | 32 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser.h | 3 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_10.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_10.h | 3 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.h | 3 |
6 files changed, 56 insertions, 16 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 4a7225af36a..bd838193019 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,27 @@ +Tue May 01 08:50:11 2001 Ossama Othman <ossama@uci.edu> + + * tao/GIOP_Message_Generator_Parser.h (write_reply_header): + * tao/GIOP_Message_Generator_Parser_10.h (write_reply_header): + * tao/GIOP_Message_Generator_Parser_10.cpp (write_reply_header): + * tao/GIOP_Message_Generator_Parser_12.h (write_reply_header): + + Removed a TSS access from the critical path on the server side + by removing the default CORBA::Environment argument + (i.e. TAO_default_environment()). TAO_default_environment() + causes a TSS access. + + NOTE: We should never use default CORBA::Environment arguments + (i.e. TAO_default_environment()) in methods that are used + internally by TAO for specifically this reason. + + * tao/GIOP_Message_Base.cpp (generate_reply_header): + + Declare a new CORBA::Environment variable and wrap the + write_reply_header() call within an ACE_TRY block. That block + was missing for some reason. These changes are part of the + fixes that remove a TSS access from the critical path on the + server side. + Tue May 1 09:40:08 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tests/AMI_Buffering/Makefile: Made a check for ami instead of diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp index 382f91a1167..9465274c87f 100644 --- a/TAO/tao/GIOP_Message_Base.cpp +++ b/TAO/tao/GIOP_Message_Base.cpp @@ -157,15 +157,35 @@ TAO_GIOP_Message_Base::generate_reply_header (TAO_OutputCDR &cdr, -1); } - // Now call the implementation for the rest of the header - if (!this->generator_parser_->write_reply_header (cdr, - params)) + ACE_DECLARE_NEW_CORBA_ENV; + ACE_TRY + { + // Now call the implementation for the rest of the header + int result = + this->generator_parser_->write_reply_header (cdr, + params, + ACE_TRY_ENV); + ACE_TRY_CHECK; + + if (!result) + { + if (TAO_debug_level > 4) + ACE_ERROR ((LM_ERROR, + ACE_TEXT ("(%P|%t) Error in writing reply ") + ACE_TEXT ("header\n"))); + + return -1; + } + } + ACE_CATCHANY { if (TAO_debug_level > 4) - ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) Error in writing reply header \n")), - -1); + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, + "TAO_GIOP_Message_Base::generate_reply_header"); + + return -1; } + ACE_ENDTRY; return 0; } diff --git a/TAO/tao/GIOP_Message_Generator_Parser.h b/TAO/tao/GIOP_Message_Generator_Parser.h index 3ced63b3299..037c42011ce 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser.h +++ b/TAO/tao/GIOP_Message_Generator_Parser.h @@ -68,8 +68,7 @@ public: virtual int write_reply_header ( TAO_OutputCDR &output, TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)) = 0; /// Writes the locate _reply message in to the <output> diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp index 3a3986d067d..33b6c3a397c 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.cpp @@ -117,9 +117,9 @@ int TAO_GIOP_Message_Generator_Parser_10::write_reply_header ( TAO_OutputCDR &output, TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &env + CORBA::Environment &ACE_TRY_ENV ) - ACE_THROW_SPEC ((CORBA::SystemException)) + ACE_THROW_SPEC ((CORBA::SystemException)) { // Write the service context list. #if (TAO_HAS_MINIMUM_CORBA == 1) @@ -219,7 +219,6 @@ TAO_GIOP_Message_Generator_Parser_10::write_reply_header ( } else { - CORBA::Environment &ACE_TRY_ENV = env; // <target> can only have the values above ACE_THROW_RETURN (CORBA::MARSHAL (), 0); @@ -242,7 +241,7 @@ TAO_GIOP_Message_Generator_Parser_10::write_reply_header ( this->marshal_reply_status (output, reply); - ACE_UNUSED_ARG (env); + ACE_UNUSED_ARG (ACE_TRY_ENV); return 1; } diff --git a/TAO/tao/GIOP_Message_Generator_Parser_10.h b/TAO/tao/GIOP_Message_Generator_Parser_10.h index ab2254ed433..a9d336abd3e 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_10.h +++ b/TAO/tao/GIOP_Message_Generator_Parser_10.h @@ -57,8 +57,7 @@ public: virtual int write_reply_header ( TAO_OutputCDR &output, TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)); /// Writes the locate _reply message in to the <output> diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.h b/TAO/tao/GIOP_Message_Generator_Parser_12.h index 0710c2e0e63..58c4270b6bb 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.h +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.h @@ -59,8 +59,7 @@ public: virtual int write_reply_header ( TAO_OutputCDR &output, TAO_Pluggable_Reply_Params &reply, - CORBA::Environment &ACE_TRY_ENV = - TAO_default_environment ()) + CORBA::Environment &ACE_TRY_ENV) ACE_THROW_SPEC ((CORBA::SystemException)); /// Writes the locate _reply message in to the <output> |