summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-19 21:23:08 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-04-19 21:23:08 +0000
commit9ba5857bc5cef79818a0d1f1e183a30286a292ce (patch)
treeb1ed5691b05e2280942334d8cdb79ab88dab8282
parent83532134aea66fe0a20cc4799767d0843a26121f (diff)
downloadATCD-9ba5857bc5cef79818a0d1f1e183a30286a292ce.tar.gz
ChangeLogTag:Thu Apr 19 14:17:38 2001 Carlos O'Ryan <coryan@uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a62
-rw-r--r--TAO/examples/Buffered_AMI/client.cpp39
-rwxr-xr-xTAO/examples/Buffered_AMI/run_test.pl2
-rw-r--r--TAO/examples/Buffered_AMI/test.idl2
-rwxr-xr-xTAO/examples/Buffered_Oneways/run_test.pl8
-rw-r--r--TAO/performance-tests/Latency/client.conf2
-rw-r--r--TAO/tao/Block_Flushing_Strategy.cpp8
-rw-r--r--TAO/tao/Synch_Queued_Message.cpp6
-rw-r--r--TAO/tao/Transport.cpp336
-rw-r--r--TAO/tao/Transport.h22
-rw-r--r--TAO/tests/Big_Request_Muxing/Client_Task.cpp2
-rw-r--r--TAO/tests/Big_Request_Muxing/Makefile180
-rw-r--r--TAO/tests/Big_Request_Muxing/client.cpp10
-rw-r--r--TAO/tests/Blocking_Sync_None/Test.idl2
-rw-r--r--TAO/tests/LongWrites/Makefile4
-rw-r--r--TAO/tests/Makefile4
-rwxr-xr-xTAO/tests/Muxing/run_test.pl2
-rw-r--r--TAO/tests/Oneway_Buffering/client.cpp18
-rw-r--r--TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp59
-rw-r--r--TAO/tests/Reliable_Oneways/Test.idl2
20 files changed, 478 insertions, 292 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index db553f00e93..978de868de0 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,65 @@
+Thu Apr 19 14:17:38 2001 Carlos O'Ryan <coryan@uci.edu>
+
+ * tao/Transport.h:
+ * tao/Transport.cpp:
+ Factor out common code in drain_queue_i() into
+ drain_queue_helper().
+ Factor out code in send_message_queue(), incidentally
+ send_message_queue() did not grab the queue lock, fixed that
+ oversight.
+ Made TAO_Block_Flushing_Strategy a friend class to access a
+ couple of _i() methods.
+
+ * tao/Synch_Queued_Message.cpp:
+ Sometimes the message block chain contain trailing empty
+ elements. Those elements must be skipped, otherwise the
+ current_block_ field never becomes 0, even though there is no
+ more data to send.
+
+ * tao/Block_Flushing_Strategy.cpp:
+ In the blocking flush strategy we need to drain the queue as
+ soon as schedule_output() is called, otherwise it is possible
+ that the queue will never be drained.
+
+ * tests/Queued_Message_Test/Queued_Message_Test.cpp:
+ Use the TAO_Async_Queued_Message class for the test, the base
+ class is abstract now.
+
+ * tests/Oneway_Buffering/client.cpp:
+ Initialize payload with non-zero bytes for easier debugging
+
+ * tests/LongWrites/Makefile:
+ Add files missed during the merge
+
+ * tests/Big_Request_Muxing/Makefile:
+ Update dependencies
+
+ * tests/Big_Request_Muxing/client.cpp:
+ Made request payload smaller, it was taking too long to run
+ otherwise.
+
+ * tests/Big_Request_Muxing/Client_Task.cpp:
+ Made the test less verbose
+
+ * tests/Makefile:
+ Add a couple of missing tests Big_Twoways and Big_Request_Muxing
+
+ * performance-tests/Latency/client.conf:
+ Made output path blocking, using reactive out with blocking
+ input does not quite work.
+
+ * examples/Buffered_AMI/test.idl:
+ * tests/Reliable_Oneways/Test.idl:
+ * tests/Blocking_Sync_None/Test.idl:
+ Made shutdown() operation a twoway.
+
+ * examples/Buffered_AMI/client.cpp:
+ Change ReplyHandler to receive the shutdown() callback.
+
+ * tests/Muxing/run_test.pl:
+ * examples/Buffered_AMI/run_test.pl:
+ Increased wait time for the IOR file.
+
Tue Apr 17 19:12:31 2001 Carlos O'Ryan <coryan@uci.edu>
* tao/Transport.cpp:
diff --git a/TAO/examples/Buffered_AMI/client.cpp b/TAO/examples/Buffered_AMI/client.cpp
index 8aad581ec55..f416910ee6b 100644
--- a/TAO/examples/Buffered_AMI/client.cpp
+++ b/TAO/examples/Buffered_AMI/client.cpp
@@ -61,13 +61,42 @@ public:
received_all_replies = 1;
}
- void method_excep (AMI_testExceptionHolder *,
+ void method_excep (AMI_testExceptionHolder *holder,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
- {
- ACE_PRINT_EXCEPTION ((*ACE_TRY_ENV.exception ()),
- "AMI exception caught:");
- }
+ {
+ ACE_TRY
+ {
+ holder->raise_method (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCH(CORBA::SystemException, ex)
+ {
+ ACE_PRINT_EXCEPTION (ex, "Reply_Handler::method_excep: ");
+ }
+ ACE_ENDTRY;
+ }
+
+ void shutdown (CORBA::Environment &)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ }
+
+ void shutdown_excep (AMI_testExceptionHolder *holder,
+ CORBA::Environment &ACE_TRY_ENV)
+ ACE_THROW_SPEC ((CORBA::SystemException))
+ {
+ ACE_TRY
+ {
+ holder->raise_shutdown (ACE_TRY_ENV);
+ ACE_TRY_CHECK;
+ }
+ ACE_CATCH(CORBA::SystemException, ex)
+ {
+ ACE_PRINT_EXCEPTION (ex, "Reply_Handler::shutdown_excep: ");
+ }
+ ACE_ENDTRY;
+ }
};
static int
diff --git a/TAO/examples/Buffered_AMI/run_test.pl b/TAO/examples/Buffered_AMI/run_test.pl
index cc4c782cf58..67d7d38fb4f 100755
--- a/TAO/examples/Buffered_AMI/run_test.pl
+++ b/TAO/examples/Buffered_AMI/run_test.pl
@@ -19,7 +19,7 @@ $CL = new PerlACE::Process ("client", "-k file://$iorfile -x");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill ();
exit 1;
diff --git a/TAO/examples/Buffered_AMI/test.idl b/TAO/examples/Buffered_AMI/test.idl
index cacccf61188..2a1eca586b6 100644
--- a/TAO/examples/Buffered_AMI/test.idl
+++ b/TAO/examples/Buffered_AMI/test.idl
@@ -7,5 +7,5 @@ interface test
void method (in unsigned long request_number,
out unsigned long reply_number);
- oneway void shutdown ();
+ void shutdown ();
};
diff --git a/TAO/examples/Buffered_Oneways/run_test.pl b/TAO/examples/Buffered_Oneways/run_test.pl
index ff810f280c4..5d64b90f060 100755
--- a/TAO/examples/Buffered_Oneways/run_test.pl
+++ b/TAO/examples/Buffered_Oneways/run_test.pl
@@ -29,7 +29,7 @@ print STDERR "\nFlushing based on implicit message counts\n\n";
$CL->Arguments ("-k file://$iorfile -c 5 -b -1 -f -1 -t -1");
-$client = $CL->SpawnWaitKill (60);
+$client = $CL->SpawnWaitKill (300);
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
@@ -40,7 +40,7 @@ print STDERR "\nFlushing based on implicit message bytes\n\n";
$CL->Arguments ("-k file://$iorfile -b 250 -c -1 -f -1 -t -1");
-$client = $CL->SpawnWaitKill (60);
+$client = $CL->SpawnWaitKill (300);
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
@@ -51,7 +51,7 @@ print STDERR "\nFlushing based on implicit timeout\n\n";
$CL->Arguments ("-k file://$iorfile -t 5000 -b -1 -c -1 -f -1");
-$client = $CL->SpawnWaitKill (60);
+$client = $CL->SpawnWaitKill (300);
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
@@ -62,7 +62,7 @@ print STDERR "\nExplicit queue flushing (and server shutdown)\n\n";
$CL->Arguments ("-k file://$iorfile -f 5 -b -1 -c 100 -t -1 -x");
-$client = $CL->SpawnWaitKill (60);
+$client = $CL->SpawnWaitKill (300);
if ($client != 0) {
print STDERR "ERROR: client returned $client\n";
diff --git a/TAO/performance-tests/Latency/client.conf b/TAO/performance-tests/Latency/client.conf
index 1396ec82df2..caebbf11fe5 100644
--- a/TAO/performance-tests/Latency/client.conf
+++ b/TAO/performance-tests/Latency/client.conf
@@ -1,4 +1,4 @@
# $Id$
#
-static Advanced_Resource_Factory "-ORBReactorType select_mt"
+static Advanced_Resource_Factory "-ORBReactorType select_mt -ORBFlushingStrategy blocking"
static Client_Strategy_Factory "-ORBclientconnectionhandler RW"
diff --git a/TAO/tao/Block_Flushing_Strategy.cpp b/TAO/tao/Block_Flushing_Strategy.cpp
index fc402ec48bf..96a6b3f12d1 100644
--- a/TAO/tao/Block_Flushing_Strategy.cpp
+++ b/TAO/tao/Block_Flushing_Strategy.cpp
@@ -8,8 +8,14 @@
ACE_RCSID(tao, Block_Flushing_Strategy, "$Id$")
int
-TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *)
+TAO_Block_Flushing_Strategy::schedule_output (TAO_Transport *transport)
{
+ while (!transport->queue_is_empty_i ())
+ {
+ int result = transport->drain_queue_i ();
+ if (result == -1)
+ return -1;
+ }
return 0;
}
diff --git a/TAO/tao/Synch_Queued_Message.cpp b/TAO/tao/Synch_Queued_Message.cpp
index eca7e879855..b65fd572408 100644
--- a/TAO/tao/Synch_Queued_Message.cpp
+++ b/TAO/tao/Synch_Queued_Message.cpp
@@ -68,6 +68,7 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count)
while (this->current_block_ != 0 && byte_count > 0)
{
size_t l = this->current_block_->length ();
+
if (byte_count < l)
{
this->current_block_->rd_ptr (byte_count);
@@ -76,6 +77,11 @@ TAO_Synch_Queued_Message::bytes_transferred (size_t &byte_count)
}
byte_count -= l;
this->current_block_ = this->current_block_->cont ();
+ while (this->current_block_ != 0
+ && this->current_block_->length () == 0)
+ {
+ this->current_block_ = this->current_block_->cont ();
+ }
}
}
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 1b3be019b3b..08772832e6f 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -211,88 +211,54 @@ dump_iov (iovec *iov, int iovcnt, int id,
}
int
-TAO_Transport::send_message_block_chain (const ACE_Message_Block *message_block,
+TAO_Transport::send_message_block_chain (const ACE_Message_Block *mb,
size_t &bytes_transferred,
- ACE_Time_Value *timeout)
+ ACE_Time_Value *max_wait_time)
{
- bytes_transferred = 0;
-
- iovec iov[IOV_MAX];
- int iovcnt = 0;
-
- while (message_block != 0)
- {
- size_t message_block_length =
- message_block->length ();
-
- // Check if this block has any data to be sent.
- if (message_block_length > 0)
- {
- // Collect the data in the iovec.
- iov[iovcnt].iov_base = message_block->rd_ptr ();
- iov[iovcnt].iov_len = message_block_length;
-
- // Increment iovec counter.
- iovcnt++;
-
- // The buffer is full make a OS call. @@ TODO find a way to
- // find IOV_MAX for platforms that do not define it rather
- // than simply setting IOV_MAX to some arbitrary value such
- // as 16.
- if (iovcnt == IOV_MAX)
- {
- size_t current_transfer = 0;
-
- ssize_t result =
- this->send (iov, iovcnt, current_transfer, timeout);
-
- if (TAO_debug_level == 2)
- {
- dump_iov (iov, iovcnt, this->id (),
- current_transfer, "send_message_block_chain");
- }
+ ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->queue_mutex_, -1);
+ return this->send_message_block_chain_i (mb,
+ bytes_transferred,
+ max_wait_time);
+}
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
+int
+TAO_Transport::send_message_block_chain_i (const ACE_Message_Block *mb,
+ size_t &bytes_transferred,
+ ACE_Time_Value *)
+{
+ size_t total_length = mb->total_length ();
- // Errors.
- if (result == -1 || result == 0)
- return result;
+ // We are going to block, so there is no need to clone
+ // the message block.
+ TAO_Synch_Queued_Message synch_message (mb);
- // Reset iovec counter.
- iovcnt = 0;
- }
- }
+ synch_message.push_back (this->head_, this->tail_);
- // Select the next message block in the chain.
- message_block = message_block->cont ();
+ int n = this->drain_queue_i ();
+ if (n == -1)
+ {
+ synch_message.remove_from_list (this->head_, this->tail_);
+ ACE_ASSERT (synch_message.next () == 0);
+ ACE_ASSERT (synch_message.prev () == 0);
+ return -1; // Error while sending...
}
-
- // Check for remaining buffers to be sent. This will happen when
- // IOV_MAX is not a multiple of the number of message blocks.
- if (iovcnt != 0)
+ else if (n == 1)
{
- size_t current_transfer = 0;
-
- ssize_t result =
- this->send (iov, iovcnt, current_transfer, timeout);
+ ACE_ASSERT (synch_message.all_data_sent ());
+ ACE_ASSERT (synch_message.next () == 0);
+ ACE_ASSERT (synch_message.prev () == 0);
+ return 1; // Empty queue, message was sent..
+ }
- if (TAO_debug_level == 2)
- {
- dump_iov (iov, iovcnt, this->id (),
- current_transfer, "send_message_block_chain");
- }
+ ACE_ASSERT (n == 0); // Some data sent, but data remains.
- // Add to total bytes transferred.
- bytes_transferred += current_transfer;
+ // Remove the temporary message from the queue...
+ synch_message.remove_from_list (this->head_, this->tail_);
- // Errors.
- if (result == -1 || result == 0)
- return result;
- }
+ bytes_transferred =
+ total_length - synch_message.message_length ();
- // Return total bytes transferred.
- return bytes_transferred;
+ return 0;
}
int
@@ -342,9 +308,9 @@ TAO_Transport::send_message_i (TAO_Stub *stub,
// we release it we need to recheck the status of the transport
// after we return... once I understand the final form for this
// code I will re-visit this decision
- n = this->send_message_block_chain (message_block,
- byte_count,
- max_wait_time);
+ n = this->send_message_block_chain_i (message_block,
+ byte_count,
+ max_wait_time);
if (n == 0)
return -1; // EOF
else if (n == -1)
@@ -370,10 +336,6 @@ TAO_Transport::send_message_i (TAO_Stub *stub,
// be fast.
return 0;
}
-
- // ... if the message was partially sent then we need to
- // continue sending ASAP ...
- (void) flushing_strategy->schedule_output (this);
}
// ... either the message must be queued or we need to queue it
@@ -401,7 +363,11 @@ TAO_Transport::send_message_i (TAO_Stub *stub,
this->check_buffering_constraints_i (stub,
must_flush);
- if (constraints_reached)
+ // ... but we also want to activate it if the message was partially
+ // sent.... Plus, when we use the blocking flushing strategy the
+ // queue is flushed as a side-effect of 'schedule_output()'
+
+ if (constraints_reached || try_sending_first)
{
(void) flushing_strategy->schedule_output (this);
}
@@ -415,11 +381,6 @@ TAO_Transport::send_message_i (TAO_Stub *stub,
(void) flushing_strategy->flush_transport (this);
}
- // ... in any case, check for timeouts and report them to the
- // application ...
- if (max_wait_time != 0 && n == -1 && errno == ETIME)
- return -1;
-
return 0;
}
@@ -477,37 +438,45 @@ TAO_Transport::send_synchronous_message_i (const ACE_Message_Block *mb,
&synch_message,
max_wait_time);
}
- if (result == -1 && errno == ETIME)
+ if (result == -1)
{
- if (this->head_ != &synch_message)
+ synch_message.remove_from_list (this->head_, this->tail_);
+ if (errno == ETIME)
{
- synch_message.remove_from_list (this->head_, this->tail_);
+ if (this->head_ == &synch_message)
+ {
+ // This is a timeout, there is only one nasty case: the
+ // message has been partially sent! We simply cannot take
+ // the message out of the queue, because that would corrupt
+ // the connection.
+ //
+ // What we do is replace the queued message with an
+ // asynchronous message, that contains only what remains of
+ // the timed out request. If you think about sending
+ // CancelRequests in this case: there is no much point in
+ // doing that: the receiving ORB would probably ignore it,
+ // and figuring out the request ID would be a bit of a
+ // nightmare.
+ //
+
+ synch_message.remove_from_list (this->head_, this->tail_);
+ TAO_Queued_Message *queued_message = 0;
+ ACE_NEW_RETURN (queued_message,
+ TAO_Asynch_Queued_Message (
+ synch_message.current_block ()),
+ -1);
+ queued_message->push_front (this->head_, this->tail_);
+ }
}
- else
+ if (TAO_debug_level > 0)
{
- // This is a timeout, there is only one nasty case: the
- // message has been partially sent! We simply cannot take
- // the message out of the queue, because that would corrupt
- // the connection.
- //
- // What we do is replace the queued message with an
- // asynchronous message, that contains only what remains of
- // the timed out request. If you think about sending
- // CancelRequests in this case: there is no much point in
- // doing that: the receiving ORB would probably ignore it,
- // and figuring out the request ID would be a bit of a
- // nightmare.
- //
-
- synch_message.remove_from_list (this->head_, this->tail_);
- TAO_Queued_Message *queued_message = 0;
- ACE_NEW_RETURN (queued_message,
- TAO_Asynch_Queued_Message (
- synch_message.current_block ()),
- -1);
- queued_message->push_front (this->head_, this->tail_);
+ ACE_ERROR ((LM_ERROR,
+ "TAO (%P|%t) TAO_Transport::send_synchronous_message_i, "
+ "error while flushing message %p\n", ""));
}
+
+ return -1;
}
else
@@ -796,6 +765,12 @@ int
TAO_Transport::queue_is_empty (void)
{
ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->queue_mutex_, 0);
+ return this->queue_is_empty_i ();
+}
+
+int
+TAO_Transport::queue_is_empty_i (void)
+{
return (this->head_ == 0);
}
@@ -882,6 +857,64 @@ TAO_Transport::drain_queue (void)
}
int
+TAO_Transport::drain_queue_helper (int &iovcnt, iovec iov[])
+{
+ size_t byte_count = 0;
+
+ // ... send the message ...
+ ssize_t retval =
+ this->send (iov, iovcnt, byte_count);
+
+ if (TAO_debug_level == 5)
+ {
+ dump_iov (iov, iovcnt, this->id (),
+ byte_count, "drain_queue_helper");
+ }
+
+ // ... now we need to update the queue, removing elements
+ // that have been sent, and updating the last element if it
+ // was only partially sent ...
+ this->cleanup_queue (byte_count);
+ iovcnt = 0;
+
+ if (retval == 0)
+ {
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::drain_queue_helper, "
+ "send() returns 0"));
+ }
+ return -1;
+ }
+ else if (retval == -1)
+ {
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::drain_queue_helper, "
+ "%p", "send()"));
+ }
+ if (errno == EWOULDBLOCK)
+ return 0;
+ return -1;
+ }
+
+ // ... start over, how do we guarantee progress? Because if
+ // no bytes are sent send() can only return 0 or -1
+ ACE_ASSERT (byte_count != 0);
+
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::drain_queue_helper, "
+ "byte_count = %d, head_is_empty = %d\n",
+ byte_count, (this->head_ == 0)));
+ }
+ return 1;
+}
+
+int
TAO_Transport::drain_queue_i (void)
{
if (this->head_ == 0)
@@ -905,38 +938,19 @@ TAO_Transport::drain_queue_i (void)
// IOV_MAX elements ...
if (iovcnt == IOV_MAX)
{
- size_t byte_count = 0;
-
- // ... send the message ...
- ssize_t retval =
- this->send (iov, iovcnt, byte_count);
+ int retval =
+ this->drain_queue_helper (iovcnt, iov);
- if (TAO_debug_level == 2)
- {
- dump_iov (iov, iovcnt, this->id (),
- byte_count, "drain_queue_i");
- }
-
- // ... now we need to update the queue, removing elements
- // that have been sent, and updating the last element if it
- // was only partially sent ...
- this->cleanup_queue (byte_count);
- iovcnt = 0;
-
- if (retval == 0)
- {
- return -1;
- }
- else if (retval == -1)
+ if (TAO_debug_level > 4)
{
- if (errno == EWOULDBLOCK)
- return 0;
- return -1;
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::drain_queue_i, "
+ "helper retval = %d\n",
+ retval));
}
+ if (retval != 1)
+ return retval;
- // ... start over, how do we guarantee progress? Because if
- // no bytes are sent send() can only return 0 or -1
- ACE_ASSERT (byte_count != 0);
i = this->head_;
continue;
}
@@ -948,30 +962,18 @@ TAO_Transport::drain_queue_i (void)
if (iovcnt != 0)
{
- size_t byte_count = 0;
- ssize_t retval =
- this->send (iov, iovcnt, byte_count);
-
- if (TAO_debug_level == 2)
- {
- dump_iov (iov, iovcnt, this->id (),
- byte_count, "drain_queue_i");
- }
-
- this->cleanup_queue (byte_count);
- iovcnt = 0;
+ int retval =
+ this->drain_queue_helper (iovcnt, iov);
- if (retval == 0)
- {
- return -1;
- }
- else if (retval == -1)
- {
- if (errno == EWOULDBLOCK)
- return 0;
- return -1;
- }
- ACE_ASSERT (byte_count != 0);
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::drain_queue_i, "
+ "helper retval = %d\n",
+ retval));
+ }
+ if (retval != 1)
+ return retval;
}
if (this->head_ == 0)
@@ -987,9 +989,25 @@ TAO_Transport::cleanup_queue (size_t byte_count)
{
TAO_Queued_Message *i = this->head_;
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::cleanup_queue, "
+ "byte_count = %d, head_is_empty = %d\n",
+ byte_count, (this->head_ == 0)));
+ }
+
// Update the state of the first message
i->bytes_transferred (byte_count);
+ if (TAO_debug_level > 4)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "TAO (%P|%t) - TAO_Transport::cleanup_queue, "
+ "after transfer, byte_count = %d, all_sent = %d\n",
+ byte_count, i->all_data_sent ()));
+ }
+
// ... if all the data was sent the message must be removed from
// the queue...
if (i->all_data_sent ())
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 1508abe906a..51b6c010b43 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -600,6 +600,10 @@ public:
const ACE_Message_Block *message_block,
ACE_Time_Value *max_wait_time);
+ /// Send a message block chain, assuming the lock is held
+ int send_message_block_chain_i (const ACE_Message_Block *message_block,
+ size_t &bytes_transferred,
+ ACE_Time_Value *max_wait_time);
/// Cache management
void mark_invalid (void);
@@ -626,6 +630,22 @@ private:
/// Implement drain_queue() assuming the lock is held
int drain_queue_i (void);
+ /// Check if there are messages pending in the queue
+ /**
+ * This version assumes that the lock is already held. Use with
+ * care!
+ *
+ * @return 1 if the queue is empty
+ */
+ int queue_is_empty_i (void);
+
+ /// This class needs special access to drain_queue_i() and
+ /// queue_is_empty_i()
+ friend class TAO_Block_Flushing_Strategy;
+
+ /// A helper routine used in drain_queue_i()
+ int drain_queue_helper (int &iovcnt, iovec iov[]);
+
/// Cleanup the queue.
/**
* Exactly <byte_count> bytes have been sent, the queue must be
@@ -697,7 +717,7 @@ protected:
TAO_Queued_Message *tail_;
/// The queue will start draining no later than <queing_deadline_>
- /// *if* the deadline is
+ /// *if* the deadline is
ACE_Time_Value current_deadline_;
/// Lock that insures that activities that *might* use handler-related
diff --git a/TAO/tests/Big_Request_Muxing/Client_Task.cpp b/TAO/tests/Big_Request_Muxing/Client_Task.cpp
index 479f03186a7..cdb06663c5e 100644
--- a/TAO/tests/Big_Request_Muxing/Client_Task.cpp
+++ b/TAO/tests/Big_Request_Muxing/Client_Task.cpp
@@ -24,7 +24,6 @@ Client_Task::Client_Task (ACE_Thread_Manager *thr_mgr,
int
Client_Task::svc (void)
{
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Starting client task\n"));
Test::Payload payload (this->event_size_);
payload.length (this->event_size_);
@@ -72,7 +71,6 @@ Client_Task::svc (void)
return -1;
}
ACE_ENDTRY;
- ACE_DEBUG ((LM_DEBUG, "(%P|%t) Client task finished\n"));
return 0;
}
diff --git a/TAO/tests/Big_Request_Muxing/Makefile b/TAO/tests/Big_Request_Muxing/Makefile
index ceac0c54e9d..54f2eb56db7 100644
--- a/TAO/tests/Big_Request_Muxing/Makefile
+++ b/TAO/tests/Big_Request_Muxing/Makefile
@@ -161,28 +161,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(TAO_ROOT)/tao/PortableServer/PortableServer.h \
$(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
$(TAO_ROOT)/tao/PortableServer/RTPortableServerC.h \
@@ -193,7 +201,6 @@ realclean: clean
$(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
$(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/ServerRequestInfo.h \
TestS_T.h TestS_T.cpp TestS_T.i \
$(ACE_ROOT)/ace/Get_Opt.h
@@ -303,28 +310,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(ACE_ROOT)/ace/Task.h \
$(ACE_ROOT)/ace/Service_Object.h \
$(ACE_ROOT)/ace/Shared_Object.h \
@@ -335,10 +350,6 @@ realclean: clean
$(ACE_ROOT)/ace/Containers_T.i \
$(ACE_ROOT)/ace/Singleton.h \
$(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Managed_Object.i \
$(ACE_ROOT)/ace/Singleton.i \
$(ACE_ROOT)/ace/Task_T.h \
$(ACE_ROOT)/ace/Message_Queue.h \
@@ -489,28 +500,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(ACE_ROOT)/ace/Task.h \
$(ACE_ROOT)/ace/Service_Object.h \
$(ACE_ROOT)/ace/Shared_Object.h \
@@ -521,10 +540,6 @@ realclean: clean
$(ACE_ROOT)/ace/Containers_T.i \
$(ACE_ROOT)/ace/Singleton.h \
$(ACE_ROOT)/ace/Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Managed_Object.i \
$(ACE_ROOT)/ace/Singleton.i \
$(ACE_ROOT)/ace/Task_T.h \
$(ACE_ROOT)/ace/Message_Queue.h \
@@ -674,28 +689,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(TAO_ROOT)/tao/PortableServer/PortableServer.h \
$(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
$(TAO_ROOT)/tao/PortableServer/RTPortableServerC.h \
@@ -706,7 +729,6 @@ realclean: clean
$(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
$(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/ServerRequestInfo.h \
TestS_T.h TestS_T.cpp TestS_T.i
.obj/TestC.o .obj/TestC.so .shobj/TestC.o .shobj/TestC.so: TestC.cpp TestC.h \
@@ -814,28 +836,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(TAO_ROOT)/tao/Stub.h \
$(TAO_ROOT)/tao/Pluggable.h \
$(TAO_ROOT)/tao/MProfile.h \
@@ -850,14 +880,6 @@ realclean: clean
$(ACE_ROOT)/ace/Shared_Object.h \
$(TAO_ROOT)/tao/Protocol_Factory.h \
$(TAO_ROOT)/tao/params.h \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/Adapter.h \
$(TAO_ROOT)/tao/PolicyFactory_Registry.h \
$(ACE_ROOT)/ace/Map_Manager.h \
@@ -911,6 +933,7 @@ realclean: clean
$(TAO_ROOT)/tao/Service_Context.h \
$(TAO_ROOT)/tao/target_specification.h \
$(TAO_ROOT)/tao/Invocation_Endpoint_Selectors.h \
+ $(TAO_ROOT)/tao/ClientRequestInfo.h \
$(TAO_ROOT)/tao/RequestInfo_Util.h \
TestC.i
@@ -1019,28 +1042,36 @@ realclean: clean
$(TAO_ROOT)/tao/PolicyC.h \
$(TAO_ROOT)/tao/CurrentC.h \
$(TAO_ROOT)/tao/Encodable.h \
+ $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/BoundsC.h \
$(TAO_ROOT)/tao/ValueBase.h \
$(TAO_ROOT)/tao/ValueFactory.h \
$(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/ClientRequestInfo.h \
+ $(TAO_ROOT)/tao/WrongTransactionC.h \
+ $(TAO_ROOT)/tao/Object_KeyC.h \
+ $(TAO_ROOT)/tao/ObjectIDList.h \
+ $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/PortableInterceptorC.h \
$(TAO_ROOT)/tao/DynamicC.h \
$(TAO_ROOT)/tao/MessagingC.h \
- $(TAO_ROOT)/tao/Remote_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/TimeBaseC.h \
+ $(TAO_ROOT)/tao/SmartProxies/Smart_Proxies.h \
+ $(TAO_ROOT)/tao/SmartProxies/smartproxies_export.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.cpp \
+ $(ACE_ROOT)/ace/Object_Manager.h \
+ $(ACE_ROOT)/ace/Managed_Object.h \
+ $(ACE_ROOT)/ace/Managed_Object.cpp \
+ $(ACE_ROOT)/ace/Managed_Object.i \
+ $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
+ $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/IOPC.h \
$(TAO_ROOT)/tao/PollableC.h \
- $(TAO_ROOT)/tao/StringSeqC.h \
- $(TAO_ROOT)/tao/WrongTransactionC.h \
- $(TAO_ROOT)/tao/Object_KeyC.h \
- $(TAO_ROOT)/tao/ObjectIDList.h \
- $(TAO_ROOT)/tao/PortableInterceptor.h \
$(TAO_ROOT)/tao/Interceptor_List.h \
$(ACE_ROOT)/ace/Array_Base.h \
$(ACE_ROOT)/ace/Array_Base.cpp \
$(ACE_ROOT)/ace/Array_Base.inl \
- $(TAO_ROOT)/tao/BiDirPolicyC.h \
+ $(TAO_ROOT)/tao/StringSeqC.h \
$(TAO_ROOT)/tao/PortableServer/PortableServer.h \
$(TAO_ROOT)/tao/PortableServer/portableserver_export.h \
$(TAO_ROOT)/tao/PortableServer/RTPortableServerC.h \
@@ -1051,7 +1082,6 @@ realclean: clean
$(TAO_ROOT)/tao/PortableServer/Collocated_Object.h \
$(TAO_ROOT)/tao/PortableServer/ThruPOA_Object_Proxy_Impl.h \
$(TAO_ROOT)/tao/PortableServer/Direct_Object_Proxy_Impl.h \
- $(TAO_ROOT)/tao/PortableServer/ServerRequestInfo.h \
TestS_T.h TestS_T.cpp TestS_T.i \
$(TAO_ROOT)/tao/PortableServer/Object_Adapter.h \
$(TAO_ROOT)/tao/PortableServer/Key_Adapters.h \
@@ -1094,19 +1124,11 @@ realclean: clean
$(TAO_ROOT)/tao/PortableServer/Active_Object_Map.h \
$(TAO_ROOT)/tao/Server_Strategy_Factory.h \
$(TAO_ROOT)/tao/Adapter.h \
+ $(TAO_ROOT)/tao/Service_Context.h \
$(TAO_ROOT)/tao/PortableServer/Operation_Table.h \
- $(TAO_ROOT)/tao/TAO_Singleton.h \
- $(TAO_ROOT)/tao/TAO_Singleton.cpp \
- $(ACE_ROOT)/ace/Object_Manager.h \
- $(ACE_ROOT)/ace/Managed_Object.h \
- $(ACE_ROOT)/ace/Managed_Object.cpp \
- $(ACE_ROOT)/ace/Managed_Object.i \
- $(TAO_ROOT)/tao/TAO_Singleton_Manager.h \
- $(TAO_ROOT)/tao/TAO_Singleton.inl \
$(TAO_ROOT)/tao/TAO_Server_Request.h \
$(TAO_ROOT)/tao/Tagged_Profile.h \
$(TAO_ROOT)/tao/GIOPC.h \
- $(TAO_ROOT)/tao/Service_Context.h \
$(TAO_ROOT)/tao/ORB_Core.h \
$(TAO_ROOT)/tao/Policy_Manager.h \
$(TAO_ROOT)/tao/Resource_Factory.h \
@@ -1139,7 +1161,13 @@ realclean: clean
$(TAO_ROOT)/tao/Tagged_Components.h \
$(TAO_ROOT)/tao/CONV_FRAMEC.h \
$(TAO_ROOT)/tao/GIOP_Message_State.h \
+ $(TAO_ROOT)/tao/IFR_Client_Adapter.h \
+ $(TAO_ROOT)/tao/PortableServer/ServerRequestInfo.h \
$(TAO_ROOT)/tao/RequestInfo_Util.h \
+ $(ACE_ROOT)/ace/Dynamic_Service.h \
+ $(ACE_ROOT)/ace/Dynamic_Service_Base.h \
+ $(ACE_ROOT)/ace/Dynamic_Service.cpp \
+ $(ACE_ROOT)/ace/Dynamic_Service.i \
TestS.i
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/TAO/tests/Big_Request_Muxing/client.cpp b/TAO/tests/Big_Request_Muxing/client.cpp
index ec93a19a3ff..38a06a91e97 100644
--- a/TAO/tests/Big_Request_Muxing/client.cpp
+++ b/TAO/tests/Big_Request_Muxing/client.cpp
@@ -64,22 +64,23 @@ main (int argc, char *argv[])
Client_Task task0 (ACE_Thread_Manager::instance (),
payload_receiver.in (),
1000,
- 32768,
+ 4096,
orb.in (),
Messaging::SYNC_WITH_TARGET);
Client_Task task1 (ACE_Thread_Manager::instance (),
payload_receiver.in (),
1000,
- 32768,
+ 4096,
orb.in (),
Messaging::SYNC_WITH_TRANSPORT);
Client_Task task2 (ACE_Thread_Manager::instance (),
payload_receiver.in (),
1000,
- 32768,
+ 4096,
orb.in (),
Messaging::SYNC_NONE);
+ ACE_DEBUG ((LM_DEBUG, "(%P) Activating threads\n"));
if (task0.activate (THR_NEW_LWP | THR_JOINABLE, 2, 1) == -1)
{
ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
@@ -93,11 +94,12 @@ main (int argc, char *argv[])
ACE_ERROR ((LM_ERROR, "Error activating client task\n"));
}
- ACE_Time_Value tv (240, 0);
+ ACE_Time_Value tv (120, 0);
orb->run (tv, ACE_TRY_ENV);
ACE_TRY_CHECK;
ACE_Thread_Manager::instance ()->wait ();
+ ACE_DEBUG ((LM_DEBUG, "(%P) Threads finished\n"));
CORBA::Long count =
payload_receiver->get_message_count (ACE_TRY_ENV);
diff --git a/TAO/tests/Blocking_Sync_None/Test.idl b/TAO/tests/Blocking_Sync_None/Test.idl
index 5e8a1360b7e..46596465827 100644
--- a/TAO/tests/Blocking_Sync_None/Test.idl
+++ b/TAO/tests/Blocking_Sync_None/Test.idl
@@ -21,6 +21,6 @@ module Test
in unsigned long sleep_microseconds);
/// Shutdown the server
- oneway void shutdown ();
+ void shutdown ();
};
};
diff --git a/TAO/tests/LongWrites/Makefile b/TAO/tests/LongWrites/Makefile
index 07e5024de83..011d622d2c3 100644
--- a/TAO/tests/LongWrites/Makefile
+++ b/TAO/tests/LongWrites/Makefile
@@ -18,9 +18,9 @@ IDL_FILES = Test
IDL_SRC = TestC.cpp TestS.cpp
BIN = server client
-SRC = $(addsuffix .cpp, $(BIN) Receiver Sender Coordinator) $(IDL_SRC)
+SRC = $(addsuffix .cpp, $(BIN) Receiver Sender Sender_Task Coordinator) $(IDL_SRC)
-CLIENT_OBJS = client.o TestC.o TestS.o Receiver.o Sender.o
+CLIENT_OBJS = client.o TestC.o TestS.o Receiver.o Sender.o Sender_Task.o
SERVER_OBJS = server.o TestC.o TestS.o Coordinator.o
TAO_IDLFLAGS += -Ge 1
diff --git a/TAO/tests/Makefile b/TAO/tests/Makefile
index f32f448e299..641209b3e62 100644
--- a/TAO/tests/Makefile
+++ b/TAO/tests/Makefile
@@ -67,7 +67,9 @@ DIRS = CDR \
Blocking_Sync_None \
Oneway_Buffering \
Queued_Message_Test \
- Big_Oneways
+ Big_Oneways \
+ Big_Twoways \
+ Big_Request_Muxing
ifndef TAO_ROOT
TAO_ROOT = $(ACE_ROOT)/TAO
diff --git a/TAO/tests/Muxing/run_test.pl b/TAO/tests/Muxing/run_test.pl
index 969633d018b..a9031c6e821 100755
--- a/TAO/tests/Muxing/run_test.pl
+++ b/TAO/tests/Muxing/run_test.pl
@@ -17,7 +17,7 @@ $CL2 = new PerlACE::Process ("client", " -k file://$iorfile");
$SV->Spawn ();
-if (PerlACE::waitforfile_timed ($iorfile, 5) == -1) {
+if (PerlACE::waitforfile_timed ($iorfile, 15) == -1) {
print STDERR "ERROR: cannot find file <$iorfile>\n";
$SV->Kill (); $SV->TimedWait (1);
exit 1;
diff --git a/TAO/tests/Oneway_Buffering/client.cpp b/TAO/tests/Oneway_Buffering/client.cpp
index add62fd6557..c578cee3681 100644
--- a/TAO/tests/Oneway_Buffering/client.cpp
+++ b/TAO/tests/Oneway_Buffering/client.cpp
@@ -269,7 +269,7 @@ configure_policies (CORBA::ORB_ptr orb,
flusher =
Test::Oneway_Buffering::_narrow (object.in (), ACE_TRY_ENV);
ACE_CHECK_RETURN (-1);
-
+
return 0;
}
@@ -295,6 +295,8 @@ run_progress_test (Test::Oneway_Buffering_ptr oneway_buffering,
Test::Payload payload (PAYLOAD_LENGTH);
payload.length (PAYLOAD_LENGTH);
+ for (int j = 0; j != PAYLOAD_LENGTH; ++j)
+ payload[j] = CORBA::Octet(j % 256);
for (int i = 0; i != progress_test_iterations; ++i)
{
@@ -338,7 +340,7 @@ run_message_count (CORBA::ORB_ptr orb,
buffering_constraint.message_bytes = 0;
buffering_constraint.timeout = 0;
- Test::Oneway_Buffering_var flusher;
+ Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
oneway_buffering, flusher.out (),
@@ -350,6 +352,8 @@ run_message_count (CORBA::ORB_ptr orb,
Test::Payload payload (PAYLOAD_LENGTH);
payload.length (PAYLOAD_LENGTH);
+ for (int j = 0; j != PAYLOAD_LENGTH; ++j)
+ payload[j] = CORBA::Octet(j % 256);
CORBA::ULong send_count = 0;
for (int i = 0; i != iterations; ++i)
@@ -438,7 +442,7 @@ run_timeout (CORBA::ORB_ptr orb,
buffering_constraint.message_bytes = 0;
buffering_constraint.timeout = TIMEOUT_MILLISECONDS * 10000;
- Test::Oneway_Buffering_var flusher;
+ Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
oneway_buffering, flusher.out (),
@@ -450,6 +454,8 @@ run_timeout (CORBA::ORB_ptr orb,
Test::Payload payload (PAYLOAD_LENGTH);
payload.length (PAYLOAD_LENGTH);
+ for (int j = 0; j != PAYLOAD_LENGTH; ++j)
+ payload[j] = CORBA::Octet(j % 256);
CORBA::ULong send_count = 0;
for (int i = 0; i != iterations; ++i)
@@ -513,7 +519,7 @@ run_timeout (CORBA::ORB_ptr orb,
}
}
}
-
+
int progress_test_failed =
run_progress_test (oneway_buffering,
flusher.in (),
@@ -540,7 +546,7 @@ run_buffer_size (CORBA::ORB_ptr orb,
buffering_constraint.message_bytes = BUFFER_SIZE;
buffering_constraint.timeout = 0;
- Test::Oneway_Buffering_var flusher;
+ Test::Oneway_Buffering_var flusher;
int test_failed =
configure_policies (orb, buffering_constraint,
oneway_buffering, flusher.out (),
@@ -552,6 +558,8 @@ run_buffer_size (CORBA::ORB_ptr orb,
Test::Payload payload (PAYLOAD_LENGTH);
payload.length (PAYLOAD_LENGTH);
+ for (int j = 0; j != PAYLOAD_LENGTH; ++j)
+ payload[j] = CORBA::Octet(j % 256);
CORBA::ULong bytes_sent = 0;
for (int i = 0; i != iterations; ++i)
diff --git a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
index 9e0efbb4f15..2742e76a92b 100644
--- a/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
+++ b/TAO/tests/Queued_Message_Test/Queued_Message_Test.cpp
@@ -8,40 +8,43 @@
*/
// ============================================================================
-#include "tao/Queued_Message.h"
+#include "tao/Asynch_Queued_Message.h"
ACE_RCSID(tests, Queued_Message_Test, "$Id$")
/// Max number of bytes on each message block
const size_t max_block_length = 256;
-/// Create a message block chain of at most 64 elements
-const size_t max_chain_length = 64;
+static TAO_Queued_Message *
+create_new_message (ACE_RANDR_TYPE &seed)
+{
+ // First create a message block
+ size_t block_size =
+ 64 + ACE_OS::rand_r(seed) % (max_block_length - 64);
+ ACE_Message_Block mb (block_size);
+ mb.wr_ptr (block_size);
+
+ return new TAO_Asynch_Queued_Message (&mb);
+}
/// Add a new message at the tail of the queue.
-static void add_message (TAO_Queued_Message *&head,
- TAO_Queued_Message *&tail,
- ACE_RANDR_TYPE &seed)
+static void push_back_message (TAO_Queued_Message *&head,
+ TAO_Queued_Message *&tail,
+ ACE_RANDR_TYPE &seed)
{
- // ACE_DEBUG ((LM_DEBUG, "Adding message\n"));
- // First build a message block chain
- size_t chain_length =
- 1 + ACE_OS::rand_r(seed) % max_chain_length;
- ACE_Message_Block *mb = 0;
- for (size_t j = 0; j != chain_length; ++j)
- {
- size_t block_size =
- 64 + ACE_OS::rand_r(seed) % (max_block_length - 64);
- ACE_Message_Block *cont = mb;
- mb = new ACE_Message_Block (block_size);
- mb->wr_ptr (block_size);
- mb->cont (cont);
- }
- TAO_Queued_Message *msg =
- new TAO_Queued_Message (mb, 1);
+ TAO_Queued_Message *msg = create_new_message (seed);
msg->push_back (head, tail);
}
+/// Add a new message at the head of the queue.
+static void push_front_message (TAO_Queued_Message *&head,
+ TAO_Queued_Message *&tail,
+ ACE_RANDR_TYPE &seed)
+{
+ TAO_Queued_Message *msg = create_new_message (seed);
+ msg->push_front (head, tail);
+}
+
/// Remove the message at the head of the queue, and simulate the
/// behavior of the I/O subsystem when processing such messages.
static void del_message (TAO_Queued_Message *&head,
@@ -56,7 +59,7 @@ static void del_message (TAO_Queued_Message *&head,
// multiple write() calls, in this simulation, we call the
// bytes_transferred() method until all messages are removed.
- size_t total_length = current->mb ()->total_length ();
+ size_t total_length = current->message_length ();
while (total_length > 0)
{
// select how many bytes we want to 'send' in this iteration.
@@ -67,7 +70,7 @@ static void del_message (TAO_Queued_Message *&head,
current->bytes_transferred (t);
total_length -= t;
}
- if (!current->done ())
+ if (!current->all_data_sent ())
{
ACE_ERROR ((LM_DEBUG,
"ERROR: inconsistent state in Queued_Message\n"));
@@ -102,7 +105,7 @@ main (int, ACE_TCHAR *[])
int i;
for (i = 0; i != iterations; ++i)
{
- add_message (head, tail, seed);
+ push_back_message (head, tail, seed);
add_count++;
if (ACE_OS::rand_r(seed) % 100 > 90)
{
@@ -120,7 +123,11 @@ main (int, ACE_TCHAR *[])
{
if (ACE_OS::rand_r(seed) % 100 > 90)
{
- add_message (head, tail, seed); add_count++;
+ push_back_message (head, tail, seed); add_count++;
+ }
+ if (ACE_OS::rand_r(seed) % 100 > 90)
+ {
+ push_front_message (head, tail, seed); add_count++;
}
if (head != 0)
{
diff --git a/TAO/tests/Reliable_Oneways/Test.idl b/TAO/tests/Reliable_Oneways/Test.idl
index 39593d25d78..a083bd6412c 100644
--- a/TAO/tests/Reliable_Oneways/Test.idl
+++ b/TAO/tests/Reliable_Oneways/Test.idl
@@ -24,6 +24,6 @@ module Test
interface Shutdown_Helper
{
/// Shutdown the server
- oneway void shutdown ();
+ void shutdown ();
};
};