summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-03-22 11:12:34 +0000
committersma <sma@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2012-03-22 11:12:34 +0000
commit45b462fb02d0824032ecc9cdce94e16d29e94087 (patch)
treeb34473037a1949ac616322cf513d5ae866532b29
parenta74789f4233449239a03e79e1a810ca54df93946 (diff)
downloadATCD-45b462fb02d0824032ecc9cdce94e16d29e94087.tar.gz
Thu Mar 22 11:10:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
* orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp: * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h: * orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp: * orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h: * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp: * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h: * tao/GIOP_Message_Base.cpp: * tao/GIOP_Message_Base.h: * tao/IIOP_Transport.cpp: * tao/IIOP_Transport.h: * tao/Messaging/AMH_Response_Handler.cpp: * tao/On_Demand_Fragmentation_Strategy.cpp: * tao/TAO_Server_Request.cpp: * tao/Transport.cpp: * tao/Transport.h: * tao/ZIOP_Adapter.h: * tao/Strategies/DIOP_Transport.cpp: * tao/Strategies/DIOP_Transport.h: * tao/Strategies/SHMIOP_Transport.cpp: * tao/Strategies/SHMIOP_Transport.h: * tao/Strategies/UIOP_Transport.cpp: * tao/Strategies/UIOP_Transport.h: * tao/ZIOP/ZIOP.cpp: * tao/ZIOP/ZIOP.h: * tests/Bug_3531b_Regression/server.cpp: Provide a pointer to the TAO_ServerRequest object down to TAO_GIOP_Message_Base::format_message() and TAO_ZIOP_LOADER::marshal_data () for server reply. Note this once more changes the transport send_message() api for ZIOP (and other furture uses) to add a possiable TAO_ServerRequest object as well as the possiable stub object. This lets the send_message access the client provided policies that control how the message is being dealt with.
-rw-r--r--TAO/ChangeLog40
-rw-r--r--TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp28
-rw-r--r--TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp18
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h1
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h1
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp60
-rw-r--r--TAO/tao/GIOP_Message_Base.h7
-rw-r--r--TAO/tao/IIOP_Transport.cpp26
-rw-r--r--TAO/tao/IIOP_Transport.h1
-rw-r--r--TAO/tao/Messaging/AMH_Response_Handler.cpp3
-rw-r--r--TAO/tao/On_Demand_Fragmentation_Strategy.cpp1
-rw-r--r--TAO/tao/Strategies/DIOP_Transport.cpp17
-rw-r--r--TAO/tao/Strategies/DIOP_Transport.h1
-rw-r--r--TAO/tao/Strategies/SHMIOP_Transport.cpp16
-rw-r--r--TAO/tao/Strategies/SHMIOP_Transport.h1
-rw-r--r--TAO/tao/Strategies/UIOP_Transport.cpp17
-rw-r--r--TAO/tao/Strategies/UIOP_Transport.h1
-rw-r--r--TAO/tao/TAO_Server_Request.cpp4
-rw-r--r--TAO/tao/Transport.cpp2
-rw-r--r--TAO/tao/Transport.h2
-rw-r--r--TAO/tao/ZIOP/ZIOP.cpp91
-rw-r--r--TAO/tao/ZIOP/ZIOP.h8
-rw-r--r--TAO/tao/ZIOP_Adapter.h6
-rw-r--r--TAO/tests/Bug_3531b_Regression/server.cpp1
26 files changed, 235 insertions, 123 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 3b1ff041144..e9691969905 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,7 +1,45 @@
+Thu Mar 22 11:10:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
+
+ * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp:
+ * orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h:
+ * orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp:
+ * orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp:
+ * orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h:
+ * tao/GIOP_Message_Base.cpp:
+ * tao/GIOP_Message_Base.h:
+ * tao/IIOP_Transport.cpp:
+ * tao/IIOP_Transport.h:
+ * tao/Messaging/AMH_Response_Handler.cpp:
+ * tao/On_Demand_Fragmentation_Strategy.cpp:
+ * tao/TAO_Server_Request.cpp:
+ * tao/Transport.cpp:
+ * tao/Transport.h:
+ * tao/ZIOP_Adapter.h:
+ * tao/Strategies/DIOP_Transport.cpp:
+ * tao/Strategies/DIOP_Transport.h:
+ * tao/Strategies/SHMIOP_Transport.cpp:
+ * tao/Strategies/SHMIOP_Transport.h:
+ * tao/Strategies/UIOP_Transport.cpp:
+ * tao/Strategies/UIOP_Transport.h:
+ * tao/ZIOP/ZIOP.cpp:
+ * tao/ZIOP/ZIOP.h:
+ * tests/Bug_3531b_Regression/server.cpp:
+
+ Provide a pointer to the TAO_ServerRequest object down to
+ TAO_GIOP_Message_Base::format_message() and
+ TAO_ZIOP_LOADER::marshal_data () for server reply.
+ Note this once more changes the transport send_message() api
+ for ZIOP (and other furture uses) to add a possiable
+ TAO_ServerRequest object as well as the possiable stub object.
+ This lets the send_message access the client provided
+ policies that control how the message is being dealt with.
+
Wed Mar 21 13:08:00 UTC 2012 Simon Massey <simon dot massey at prismtech dot com>
* tao/ZIOP/ZIOP_Service_Context_Handler.cpp:
- * tao/orbconf.h
+ * tao/orbconf.h:
+
My system had defined TAO_HAS_ZIOP explicitly so I didn't see that
the mod to disable it (Fri Feb 24 09:18:00 UTC 2012 Johnny Willemsen)
when TAO_HAS_CORBA_MESSAGING is not defined was put in before this was
diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
index dc829f0ec3a..6f5803136d1 100644
--- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp
@@ -142,14 +142,18 @@ TAO::HTIOP::Transport::send_request (TAO_Stub *stub,
{
if (this->ws_->sending_request (orb_core,
message_semantics) == -1)
-
- return -1;
+ {
+ return -1;
+ }
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
- return -1;
+ {
+ return -1;
+ }
this->first_request_sent();
@@ -159,12 +163,15 @@ TAO::HTIOP::Transport::send_request (TAO_Stub *stub,
int
TAO::HTIOP::Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// This guarantees to send all data (bytes) or return an error.
ssize_t n = this->send_message_shared (stub,
@@ -179,10 +186,13 @@ TAO::HTIOP::Transport::send_message (TAO_OutputCDR &stream,
// would return -1 with errno set to ENOENT. %p then would dump
// a core. %m would then be softer on this.
if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - TAO::HTIOP::Transport[%d]::send_message, ")
- ACE_TEXT (" write failure - %m\n"),
- this->id ()));
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - TAO::HTIOP::Transport[%d]::send_message, ")
+ ACE_TEXT (" write failure - %m\n"),
+ this->id ()));
+ }
+
return -1;
}
diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
index 4a0406d2692..f5b2a55b504 100644
--- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.h
@@ -103,6 +103,7 @@ namespace TAO
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics =
TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
index f80a55280b4..0f043ded873 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.cpp
@@ -546,6 +546,7 @@ TAO_UIPMC_Transport<CONNECTION_HANDLER>::send_request (TAO_Stub *stub,
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
@@ -558,12 +559,15 @@ template<typename CONNECTION_HANDLER>
int
TAO_UIPMC_Transport<CONNECTION_HANDLER>::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// Strictly speaking, should not need to loop here because the
// socket never gets set to a nonblocking mode ... some Linux
@@ -578,10 +582,12 @@ TAO_UIPMC_Transport<CONNECTION_HANDLER>::send_message (TAO_OutputCDR &stream,
if (n == -1)
{
if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO: (%P|%t|%N|%l) closing transport %d after fault %m\n"),
- this->id (),
- ACE_TEXT ("send_message ()\n")));
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO: (%P|%t|%N|%l) closing transport %d after fault %m\n"),
+ this->id (),
+ ACE_TEXT ("send_message ()\n")));
+ }
return -1;
}
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h
index a6f831160ca..1a2e3b4cc69 100644
--- a/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/UIPMC_Transport.h
@@ -87,6 +87,7 @@ public:
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics =
TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index 1e5f5c3996b..c6df3ae8d8c 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -123,6 +123,7 @@ TAO::SSLIOP::Transport::send_request (TAO_Stub *stub,
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
@@ -134,11 +135,12 @@ TAO::SSLIOP::Transport::send_request (TAO_Stub *stub,
int
TAO::SSLIOP::Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
return -1;
// Strictly speaking, should not need to loop here because the
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
index 10b2f901539..426c91205ee 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
@@ -107,6 +107,7 @@ namespace TAO
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics =
TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index a0a4ab40057..d2b9745c4e5 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -258,49 +258,43 @@ TAO_GIOP_Message_Base::dump_consolidated_msg (TAO_OutputCDR &stream)
}
int
-TAO_GIOP_Message_Base::format_message (TAO_OutputCDR &stream, TAO_Stub* stub)
+TAO_GIOP_Message_Base::format_message (TAO_OutputCDR &stream, TAO_Stub *stub, TAO_ServerRequest *request)
{
this->set_giop_flags (stream);
bool log_msg = TAO_debug_level > 9;
-
-#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP ==1
- TAO_ZIOP_Adapter* ziop_adapter = this->orb_core_->ziop_adapter ();
-
- // Ziop adapter found and not compressed yet
- if (ziop_adapter)
+ if (stub || request)
{
- if (TAO_debug_level > 9)
+#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP != 0
+ TAO_ZIOP_Adapter* ziop_adapter = this->orb_core_->ziop_adapter ();
+ if (ziop_adapter)
{
- this->dump_consolidated_msg (stream);
- }
- bool compressed;
- if (stub)
- {
- compressed = ziop_adapter->marshal_data (stream, *stub);
- }
- else
- {
- compressed = ziop_adapter->marshal_data (stream, *this->orb_core_);
- }
+ if (log_msg)
+ {
+ this->dump_consolidated_msg (stream);
+ }
- if (TAO_debug_level > 9)
- {
- if (!compressed)
+ const bool compressed=
+ stub ?
+ ziop_adapter->marshal_data (stream, *stub) :
+ ziop_adapter->marshal_data (stream, *this->orb_core_, request);
+
+ if (log_msg && !compressed)
+ {
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - ")
ACE_TEXT ("TAO_GIOP_Message_Base::format_message, ")
ACE_TEXT ("GIOP message not compressed\n")));
- // no need to log. If compressed->ZIOP library dumps message
- // if not compressed (due to failure or policy settings)
- // message hasn't changed and was allready dumped
- // prior to compression...
- log_msg = false;
- }
+
+ // no need to log. If compressed->ZIOP library dumps message
+ // if not compressed (due to failure or policy settings)
+ // message hasn't changed and was allready dumped
+ // prior to compression...
+ log_msg = false;
+ }
+ }
+#endif /* TAO_HAS_ZIOP */
}
-#else
- ACE_UNUSED_ARG (stub);
-#endif
// Length of all buffers.
size_t const total_len = stream.total_length ();
@@ -1032,6 +1026,7 @@ TAO_GIOP_Message_Base::process_request (
int const result = transport->send_message (output,
0,
+ &request,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
if (result == -1)
{
@@ -1285,6 +1280,7 @@ TAO_GIOP_Message_Base::make_send_locate_reply (TAO_Transport *transport,
// Send the message
int const result = transport->send_message (output,
0,
+ 0,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
// Print out message if there is an error
@@ -1502,7 +1498,7 @@ TAO_GIOP_Message_Base::send_reply_exception (
output.more_fragments (false);
- return transport->send_message (output, 0, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
+ return transport->send_message (output, 0, 0, TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
}
void
diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h
index 2c3973ecdcc..ecee477093d 100644
--- a/TAO/tao/GIOP_Message_Base.h
+++ b/TAO/tao/GIOP_Message_Base.h
@@ -37,6 +37,7 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
class TAO_Pluggable_Reply_Params;
class TAO_Queued_Data;
+class TAO_ServerRequest;
/**
* @class TAO_GIOP_Message_Base
@@ -84,8 +85,10 @@ public:
/// Format the message. As we have not written the message length in
/// the header, we make use of this opportunity to insert and format
- /// the message.
- int format_message (TAO_OutputCDR &cdr, TAO_Stub* stub);
+ /// the message. (Called by client, for requests, provides stub pointer
+ /// but not the req pointer; called by server, for replies, provides req
+ /// pointer, not stub pointer.)
+ int format_message (TAO_OutputCDR &cdr, TAO_Stub *stub, TAO_ServerRequest *req);
/**
* Parse the details of the next message from the @a incoming
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 7cadc0eddcb..3dc71149072 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -210,13 +210,18 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub,
ACE_Time_Value *max_wait_time)
{
if (this->ws_->sending_request (orb_core, message_semantics) == -1)
- return -1;
+ {
+ return -1;
+ }
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
- return -1;
+ {
+ return -1;
+ }
this->first_request_sent();
@@ -226,12 +231,15 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub,
int
TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// This guarantees to send all data (bytes) or return an error.
ssize_t const n = this->send_message_shared (stub,
@@ -246,10 +254,12 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream,
// would return -1 with errno set to ENOENT. %p then would dump
// a core. %m would then be softer on this.
if (TAO_debug_level)
- ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::send_message, ")
- ACE_TEXT ("write failure - %m\n"),
- this->id ()));
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::send_message, ")
+ ACE_TEXT ("write failure - %m\n"),
+ this->id ()));
+ }
return -1;
}
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index b61559b0399..fb4a6acac11 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -109,6 +109,7 @@ public:
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/tao/Messaging/AMH_Response_Handler.cpp b/TAO/tao/Messaging/AMH_Response_Handler.cpp
index 76d617628e5..8416ec1c049 100644
--- a/TAO/tao/Messaging/AMH_Response_Handler.cpp
+++ b/TAO/tao/Messaging/AMH_Response_Handler.cpp
@@ -147,6 +147,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_reply (void)
// Send the message.
int result = this->transport_->send_message (this->_tao_out,
0,
+ 0,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
if (result == -1)
@@ -212,6 +213,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_exception (const CORBA::Exception &ex)
// Send the Exception
if (this->transport_->send_message (this->_tao_out,
0,
+ 0,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1)
{
if (TAO_debug_level > 0)
@@ -278,6 +280,7 @@ TAO_AMH_Response_Handler::_tao_rh_send_location_forward (CORBA::Object_ptr fwd,
// Send the Exception
if (this->transport_->send_message (this->_tao_out,
0,
+ 0,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1)
{
if (TAO_debug_level > 0)
diff --git a/TAO/tao/On_Demand_Fragmentation_Strategy.cpp b/TAO/tao/On_Demand_Fragmentation_Strategy.cpp
index e5f25b89df2..0a4c7ac28b0 100644
--- a/TAO/tao/On_Demand_Fragmentation_Strategy.cpp
+++ b/TAO/tao/On_Demand_Fragmentation_Strategy.cpp
@@ -78,6 +78,7 @@ TAO_On_Demand_Fragmentation_Strategy::fragment (
// bit.
if (this->transport_->send_message (cdr,
cdr.stub (),
+ 0,
cdr.message_semantics (),
cdr.timeout ()) == -1
diff --git a/TAO/tao/Strategies/DIOP_Transport.cpp b/TAO/tao/Strategies/DIOP_Transport.cpp
index 8a4d8df144c..d054252f6ca 100644
--- a/TAO/tao/Strategies/DIOP_Transport.cpp
+++ b/TAO/tao/Strategies/DIOP_Transport.cpp
@@ -228,14 +228,18 @@ TAO_DIOP_Transport::send_request (TAO_Stub *stub,
ACE_Time_Value *max_wait_time)
{
if (this->ws_->sending_request (orb_core, message_semantics) == -1)
- return -1;
+ {
+ return -1;
+ }
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
-
- return -1;
+ {
+ return -1;
+ }
this->first_request_sent ();
@@ -245,12 +249,15 @@ TAO_DIOP_Transport::send_request (TAO_Stub *stub,
int
TAO_DIOP_Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// Strictly speaking, should not need to loop here because the
// socket never gets set to a nonblocking mode ... some Linux
diff --git a/TAO/tao/Strategies/DIOP_Transport.h b/TAO/tao/Strategies/DIOP_Transport.h
index 1cba2212e5c..1221d11cbe5 100644
--- a/TAO/tao/Strategies/DIOP_Transport.h
+++ b/TAO/tao/Strategies/DIOP_Transport.h
@@ -98,6 +98,7 @@ public:
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp
index ae41d111420..3428412db55 100644
--- a/TAO/tao/Strategies/SHMIOP_Transport.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp
@@ -275,14 +275,19 @@ TAO_SHMIOP_Transport::send_request (TAO_Stub *stub,
{
if (this->ws_->sending_request (orb_core,
message_semantics) == -1)
- return -1;
+ {
+ return -1;
+ }
if (this->send_message (stream,
stub,
+ 0,
message_semantics,
max_wait_time) == -1)
+ {
+ return -1;
+ }
- return -1;
this->first_request_sent();
return 0;
@@ -291,12 +296,15 @@ TAO_SHMIOP_Transport::send_request (TAO_Stub *stub,
int
TAO_SHMIOP_Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// Strictly speaking, should not need to loop here because the
// socket never gets set to a nonblocking mode ... some Linux
diff --git a/TAO/tao/Strategies/SHMIOP_Transport.h b/TAO/tao/Strategies/SHMIOP_Transport.h
index 186f6a62860..6516848b956 100644
--- a/TAO/tao/Strategies/SHMIOP_Transport.h
+++ b/TAO/tao/Strategies/SHMIOP_Transport.h
@@ -96,6 +96,7 @@ public:
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp
index c632dc5515c..3ce9ff785c5 100644
--- a/TAO/tao/Strategies/UIOP_Transport.cpp
+++ b/TAO/tao/Strategies/UIOP_Transport.cpp
@@ -101,10 +101,14 @@ TAO_UIOP_Transport::send_request (TAO_Stub *stub,
ACE_Time_Value *max_wait_time)
{
if (this->ws_->sending_request (orb_core, message_semantics) == -1)
- return -1;
+ {
+ return -1;
+ }
- if (this->send_message (stream, stub, message_semantics, max_wait_time) == -1)
- return -1;
+ if (this->send_message (stream, stub, 0, message_semantics, max_wait_time) == -1)
+ {
+ return -1;
+ }
this->first_request_sent();
@@ -114,12 +118,15 @@ TAO_UIOP_Transport::send_request (TAO_Stub *stub,
int
TAO_UIOP_Transport::send_message (TAO_OutputCDR &stream,
TAO_Stub *stub,
+ TAO_ServerRequest *request,
TAO_Message_Semantics message_semantics,
ACE_Time_Value *max_wait_time)
{
// Format the message in the stream first
- if (this->messaging_object ()->format_message (stream, stub) != 0)
- return -1;
+ if (this->messaging_object ()->format_message (stream, stub, request) != 0)
+ {
+ return -1;
+ }
// Strictly speaking, should not need to loop here because the
// socket never gets set to a nonblocking mode ... some Linux
diff --git a/TAO/tao/Strategies/UIOP_Transport.h b/TAO/tao/Strategies/UIOP_Transport.h
index d103a35da5f..4157f03891c 100644
--- a/TAO/tao/Strategies/UIOP_Transport.h
+++ b/TAO/tao/Strategies/UIOP_Transport.h
@@ -90,6 +90,7 @@ public:
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0);
//@}
diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp
index f26973457f9..79f0a65900e 100644
--- a/TAO/tao/TAO_Server_Request.cpp
+++ b/TAO/tao/TAO_Server_Request.cpp
@@ -324,6 +324,7 @@ TAO_ServerRequest::send_no_exception_reply (void)
// Send the message.
int const result = this->transport_->send_message (*this->outgoing_,
0,
+ this,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
if (result == -1)
@@ -351,6 +352,7 @@ TAO_ServerRequest::tao_send_reply (void)
int const result = this->transport_->send_message (*this->outgoing_,
0,
+ this,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY));
if (result == -1)
{
@@ -439,6 +441,7 @@ TAO_ServerRequest::tao_send_reply_exception (const CORBA::Exception &ex)
// Send the message
if (this->transport_->send_message (*this->outgoing_,
0,
+ this,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1)
{
ACE_ERROR ((LM_ERROR,
@@ -550,6 +553,7 @@ TAO_ServerRequest::send_cached_reply (CORBA::OctetSeq &s)
// Send the message
if (this->transport_->send_message (*this->outgoing_,
0,
+ this,
TAO_Message_Semantics (TAO_Message_Semantics::TAO_REPLY)) == -1)
{
ACE_ERROR ((LM_ERROR,
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 4c0f1731d68..da78037256f 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -622,7 +622,7 @@ TAO_Transport::format_queue_message (TAO_OutputCDR &stream,
ACE_Time_Value *max_wait_time,
TAO_Stub* stub)
{
- if (this->messaging_object ()->format_message (stream, stub) != 0)
+ if (this->messaging_object ()->format_message (stream, stub, 0) != 0)
return -1;
return this->queue_message_i (stream.begin (), max_wait_time);
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 47fd8e3b4a0..543b9fb668c 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -50,6 +50,7 @@ class TAO_Synch_Queued_Message;
class TAO_Resume_Handle;
class TAO_Stub;
class TAO_MMAP_Allocator;
+class TAO_ServerRequest;
namespace TAO
{
@@ -760,6 +761,7 @@ public:
*/
virtual int send_message (TAO_OutputCDR &stream,
TAO_Stub *stub = 0,
+ TAO_ServerRequest *request = 0,
TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
ACE_Time_Value *max_time_wait = 0) = 0;
diff --git a/TAO/tao/ZIOP/ZIOP.cpp b/TAO/tao/ZIOP/ZIOP.cpp
index 525b2cb2871..af6f3694b13 100644
--- a/TAO/tao/ZIOP/ZIOP.cpp
+++ b/TAO/tao/ZIOP/ZIOP.cpp
@@ -58,7 +58,8 @@ TAO_ZIOP_Loader::init (int, ACE_TCHAR* [])
return -1;
}
}
-#endif
+#endif /* TAO_HAS_CORBA_MESSAGING */
+
return 0;
}
@@ -88,9 +89,9 @@ TAO_ZIOP_Loader::load_policy_validators (TAO_Policy_Validator &val)
// the design simple and not try to avoid an ineficiency of such
// small proportions.
val.add_validator (validator);
-#else
+#else /* TAO_HAS_CORBA_MESSAGING */
ACE_UNUSED_ARG (val);
-#endif
+#endif /* TAO_HAS_CORBA_MESSAGING */
}
int
@@ -116,6 +117,7 @@ TAO_ZIOP_Loader::ziop_compressorid_name (::Compression::CompressorId st)
case ::Compression::COMPRESSORID_XAR: return "XAR";
case ::Compression::COMPRESSORID_RLE: return "RLE";
}
+
return "Unknown";
}
@@ -149,6 +151,7 @@ TAO_ZIOP_Loader::dump_msg (const char *type, const u_char *ptr,
ratio,
TAO_ZIOP_Loader::ziop_compressorid_name(compressor_id),
compression_level));
+
ACE_HEX_DUMP ((LM_DEBUG,
(const char *) ptr,
len,
@@ -180,12 +183,7 @@ bool
TAO_ZIOP_Loader::decompress (ACE_Data_Block **db, TAO_Queued_Data& qd,
TAO_ORB_Core& orb_core)
{
-#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP == 0
- ACE_UNUSED_ARG (db);
- ACE_UNUSED_ARG (qd);
- ACE_UNUSED_ARG (orb_core);
- return true;
-#else
+#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP != 0
CORBA::Object_var compression_manager =
orb_core.resolve_compression_manager();
@@ -210,7 +208,9 @@ TAO_ZIOP_Loader::decompress (ACE_Data_Block **db, TAO_Queued_Data& qd,
&orb_core);
if (!(cdr >> data))
- return false;
+ {
+ return false;
+ }
Compression::Compressor_var compressor =
manager->get_compressor (data.compressor, 6);
@@ -257,9 +257,13 @@ TAO_ZIOP_Loader::decompress (ACE_Data_Block **db, TAO_Queued_Data& qd,
{
return false;
}
+#else /* TAO_HAS_ZIOP */
+ ACE_UNUSED_ARG (db);
+ ACE_UNUSED_ARG (qd);
+ ACE_UNUSED_ARG (orb_core);
+#endif /* TAO_HAS_ZIOP */
return true;
-#endif
}
CORBA::ULong
@@ -278,9 +282,9 @@ TAO_ZIOP_Loader::compression_low_value (CORBA::Policy_ptr policy) const
result = srp->low_value ();
}
}
-#else
+#else /* TAO_HAS_CORBA_MESSAGING */
ACE_UNUSED_ARG (policy);
-#endif
+#endif /* TAO_HAS_CORBA_MESSAGING */
return result;
}
@@ -300,9 +304,9 @@ TAO_ZIOP_Loader::compression_minratio_value (CORBA::Policy_ptr policy) const
result = srp->ratio ();
}
}
-#else
+#else /* TAO_HAS_CORBA_MESSAGING */
ACE_UNUSED_ARG (policy);
-#endif
+#endif /* TAO_HAS_CORBA_MESSAGING */
return result;
}
@@ -554,15 +558,9 @@ TAO_ZIOP_Loader::compress_data (TAO_OutputCDR &cdr,
}
bool
-TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR &cdr, TAO_Stub& stub)
+TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR &cdr, TAO_Stub &stub)
{
-#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP == 0
- ACE_UNUSED_ARG (cdr);
- ACE_UNUSED_ARG (stub);
- return true;
-#else
- CORBA::Boolean use_ziop = false;
-
+#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP != 0
Compression::CompressorId compressor_id = Compression::COMPRESSORID_NONE;
Compression::CompressionLevel compression_level = 0;
@@ -571,11 +569,11 @@ TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR &cdr, TAO_Stub& stub)
CORBA::Policy_var compression_level_list_policy =
stub.get_cached_policy (TAO_CACHED_COMPRESSION_ID_LEVEL_LIST_POLICY);
- use_ziop = get_compression_details(compression_enabling_policy.in (),
- compression_level_list_policy.in (),
- compressor_id, compression_level);
-
- if (use_ziop)
+ if (get_compression_details (
+ compression_enabling_policy.in (),
+ compression_level_list_policy.in (),
+ compressor_id,
+ compression_level))
{
CORBA::Object_var compression_manager =
stub.orb_core ()->resolve_compression_manager();
@@ -594,19 +592,23 @@ TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR &cdr, TAO_Stub& stub)
low_value, min_ratio,
compressor_id, compression_level);
}
+#else /* TAO_HAS_ZIOP */
+ ACE_UNUSED_ARG (cdr);
+ ACE_UNUSED_ARG (stub);
+#endif /* TAO_HAS_ZIOP */
+
return false;
-#endif
}
bool
-TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR& cdr, TAO_ORB_Core& orb_core)
+TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR &cdr, TAO_ORB_Core &orb_core, TAO_ServerRequest *request)
{
-#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP == 0
- ACE_UNUSED_ARG (cdr);
- ACE_UNUSED_ARG (orb_core);
- return true;
-#else
- CORBA::Boolean use_ziop = false;
+ if (!request)
+ {
+ return false;
+ }
+
+#if defined (TAO_HAS_ZIOP) && TAO_HAS_ZIOP != 0
Compression::CompressorId compressor_id = Compression::COMPRESSORID_NONE;
Compression::CompressionLevel compression_level = 0;
@@ -618,11 +620,11 @@ TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR& cdr, TAO_ORB_Core& orb_core)
orb_core.get_cached_policy_including_current
(TAO_CACHED_COMPRESSION_ID_LEVEL_LIST_POLICY);
- use_ziop = get_compression_details(compression_enabling_policy.in (),
- compression_level_list_policy.in (),
- compressor_id, compression_level);
-
- if (use_ziop)
+ if (get_compression_details (
+ compression_enabling_policy.in (),
+ compression_level_list_policy.in (),
+ compressor_id,
+ compression_level))
{
CORBA::Object_var compression_manager =
orb_core.resolve_compression_manager();
@@ -644,9 +646,12 @@ TAO_ZIOP_Loader::marshal_data (TAO_OutputCDR& cdr, TAO_ORB_Core& orb_core)
low_value, min_ratio,
compressor_id, compression_level);
}
- return false;
+#else /* TAO_HAS_ZIOP */
+ ACE_UNUSED_ARG (cdr);
+ ACE_UNUSED_ARG (orb_core);
+#endif /* TAO_HAS_ZIOP */
-#endif
+ return false;
}
ACE_STATIC_SVC_DEFINE (TAO_ZIOP_Loader,
diff --git a/TAO/tao/ZIOP/ZIOP.h b/TAO/tao/ZIOP/ZIOP.h
index e0811fc084a..3042dbb0fae 100644
--- a/TAO/tao/ZIOP/ZIOP.h
+++ b/TAO/tao/ZIOP/ZIOP.h
@@ -31,6 +31,8 @@
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+class TAO_ServerRequest;
+
/**
* @class TAO_ZIOP_Loader
*
@@ -47,11 +49,11 @@ public:
/// Destructor
virtual ~TAO_ZIOP_Loader (void);
- virtual bool decompress (ACE_Data_Block **db, TAO_Queued_Data& qd, TAO_ORB_Core& orb_core);
+ virtual bool decompress (ACE_Data_Block **db, TAO_Queued_Data &qd, TAO_ORB_Core &orb_core);
// Compress the @a stream. Starting point of the compression is rd_ptr()
- virtual bool marshal_data (TAO_OutputCDR& cdr, TAO_Stub& stub);
- virtual bool marshal_data (TAO_OutputCDR& cdr, TAO_ORB_Core& orb_core);
+ virtual bool marshal_data (TAO_OutputCDR &cdr, TAO_Stub &stub);
+ virtual bool marshal_data (TAO_OutputCDR &cdr, TAO_ORB_Core &orb_core, TAO_ServerRequest *request);
/// Initialize the BiDIR loader hooks.
virtual int init (int argc, ACE_TCHAR* []);
diff --git a/TAO/tao/ZIOP_Adapter.h b/TAO/tao/ZIOP_Adapter.h
index 1fbc4d41a6b..fb24b4f7110 100644
--- a/TAO/tao/ZIOP_Adapter.h
+++ b/TAO/tao/ZIOP_Adapter.h
@@ -40,10 +40,10 @@ class TAO_Queued_Data;
class TAO_Export TAO_ZIOP_Adapter : public ACE_Service_Object
{
public:
- virtual bool decompress (ACE_Data_Block **db, TAO_Queued_Data& qd, TAO_ORB_Core& orb_core) = 0;
+ virtual bool decompress (ACE_Data_Block **db, TAO_Queued_Data &qd, TAO_ORB_Core &orb_core) = 0;
- virtual bool marshal_data (TAO_OutputCDR& cdr, TAO_Stub& stub) = 0;
- virtual bool marshal_data (TAO_OutputCDR& cdr, TAO_ORB_Core& orb_core) = 0;
+ virtual bool marshal_data (TAO_OutputCDR &cdr, TAO_Stub &stub) = 0;
+ virtual bool marshal_data (TAO_OutputCDR &cdr, TAO_ORB_Core &orb_core, TAO_ServerRequest *request) = 0;
virtual void load_policy_validators (TAO_Policy_Validator &validator) = 0;
diff --git a/TAO/tests/Bug_3531b_Regression/server.cpp b/TAO/tests/Bug_3531b_Regression/server.cpp
index 153e1cfec84..24604834f24 100644
--- a/TAO/tests/Bug_3531b_Regression/server.cpp
+++ b/TAO/tests/Bug_3531b_Regression/server.cpp
@@ -290,6 +290,7 @@ public:
virtual int send_message (TAO_OutputCDR &,
TAO_Stub * = 0,
+ TAO_ServerRequest * = 0,
TAO_Message_Semantics = TAO_Message_Semantics (),
ACE_Time_Value * = 0)
{