summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp')
-rw-r--r--TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp b/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp
index 2bfd8c9d7b8..5a169472c6b 100644
--- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp
+++ b/TAO/orbsvcs/tests/AVStreams/benchmark/client.cpp
@@ -103,11 +103,11 @@ ttcp_Client_StreamEndPoint::handle_preconnect (AVStreams::flowSpec &the_spec)
if (this->acceptor_.open (tcp_addr,
TAO_ORB_Core_instance ()->reactor ()) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,"%p\n","open"),0);
+ ACE_ERROR_RETURN ((LM_ERROR,"%p\n","open"),-1);
ACE_INET_Addr local_addr;
if (this->acceptor_.acceptor ().get_local_addr (local_addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)acceptor get local addr failed %p"),0);
+ ACE_ERROR_RETURN ((LM_ERROR,"(%P|%t)acceptor get local addr failed %p"),-1);
char client_address_string [BUFSIZ];
::sprintf (client_address_string,
@@ -141,13 +141,12 @@ ttcp_Client_StreamEndPoint::open (void *)
}
Client::Client (int argc, char **argv,int task_id)
- :ttcp_reactive_strategy_ (&orb_manager_,this),
- reactive_strategy_ (&orb_manager_),
- client_mmdevice_ (0),
- argc_ (argc),
- argv_ (argv),
- task_id_ (task_id)
-
+ : reactive_strategy_ (&orb_manager_),
+ ttcp_reactive_strategy_ (&orb_manager_,this),
+ client_mmdevice_ (0),
+ argc_ (argc),
+ argv_ (argv),
+ task_id_ (task_id)
{
}
@@ -333,7 +332,13 @@ Client::svc (void)
timer.start ();
for (int i=0;i<number;i++)
{
- this->stream_.send_n (buffer,buffer_siz);
+ cerr << i << " ";
+ if (i == 136)
+ {
+ this->stream_.send_n (buffer,buffer_siz);
+ }
+ else
+ this->stream_.send_n (buffer,buffer_siz);
}
timer.stop ();
timer.elapsed_time (tv2);
@@ -467,8 +472,7 @@ main (int argc, char **argv)
GLOBALS::instance ()->thread_count_ = 1;
// Preliminary argument processing.
- int i;
- for (i=0;i< argc;i++)
+ for (int i=0;i< argc;i++)
{
if (ACE_OS::strcmp (argv[i],"-t") == 0
&& (i - 1 < argc))
@@ -504,8 +508,6 @@ template class TAO_AV_Endpoint_Reactive_Strategy_A<Client_StreamEndPoint,TAO_VDe
template class ACE_Acceptor <ttcp_Client_StreamEndPoint,ACE_SOCK_ACCEPTOR>;
template class ACE_Svc_Handler <ACE_SOCK_STREAM, ACE_NULL_SYNCH>;
template class ACE_Task<ACE_SYNCH>;
-template class ACE_Condition<ACE_SYNCH_MUTEX> ;
-template class ACE_Singleton<Globals,ACE_SYNCH_MUTEX>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy<ttcp_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl>
#pragma instantiate TAO_AV_Endpoint_Reactive_Strategy<Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl>
@@ -514,6 +516,4 @@ template class ACE_Singleton<Globals,ACE_SYNCH_MUTEX>;
#pragma instantiate ACE_Acceptor <ttcp_Client_StreamEndPoint,ACE_SOCK_ACCEPTOR>
#pragma instantiate ACE_Svc_Handler <ACE_SOCK_STREAM, ACE_NULL_SYNCH>
#pragma instantiate ACE_Task<ACE_SYNCH>
-#pragma instantiate ACE_Condition<ACE_SYNCH_MUTEX>
-#pragma instantiate ACE_Singleton <Globals,ACE_SYNCH_MUTEX>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */