summaryrefslogtreecommitdiff
path: root/TAO/tao/default_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/default_client.cpp')
-rw-r--r--TAO/tao/default_client.cpp92
1 files changed, 48 insertions, 44 deletions
diff --git a/TAO/tao/default_client.cpp b/TAO/tao/default_client.cpp
index 022e915d6a5..f45d053efb4 100644
--- a/TAO/tao/default_client.cpp
+++ b/TAO/tao/default_client.cpp
@@ -55,55 +55,51 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char ** argv)
for (curarg = 0; curarg < argc && argv[curarg]; curarg++)
{
- if (ACE_OS::strcasecmp (argv[curarg],
- "-ORBIIOPProfileLock") == 0)
+ if (ACE_OS::strcmp (argv[curarg], "-ORBiiopprofilelock") == 0)
{
curarg++;
if (curarg < argc)
{
char *name = argv[curarg];
- if (ACE_OS::strcasecmp (name,
- "thread") == 0)
+ if (ACE_OS::strcasecmp (name, "thread") == 0)
this->iiop_profile_lock_type_ = TAO_THREAD_LOCK;
- else if (ACE_OS::strcasecmp (name,
- "null") == 0)
+ else if (ACE_OS::strcasecmp (name, "null") == 0)
this->iiop_profile_lock_type_ = TAO_NULL_LOCK;
}
}
- else if (ACE_OS::strcasecmp (argv[curarg],
- "-ORBClientConnectionHandler") == 0)
+ else if (ACE_OS::strcmp (argv[curarg], "-ORBclientconnectionhandler") == 0)
{
curarg++;
if (curarg < argc)
{
char *name = argv[curarg];
- if (ACE_OS::strcasecmp (name,
- "MT") == 0)
- this->wait_strategy_ = TAO_WAIT_ON_LEADER_FOLLOWER;
- else if (ACE_OS::strcasecmp (name,
- "ST") == 0)
- this->wait_strategy_ = TAO_WAIT_ON_REACTOR;
- else if (ACE_OS::strcasecmp (name,
- "RW") == 0)
- this->wait_strategy_ = TAO_WAIT_ON_READ;
+ if (ACE_OS::strcasecmp (name, "MT") == 0)
+ {
+ this->wait_strategy_ = TAO_WAIT_ON_LEADER_FOLLOWER;
+ }
+ else if (ACE_OS::strcasecmp (name, "ST") == 0)
+ {
+ this->wait_strategy_ = TAO_WAIT_ON_REACTOR;
+ }
+ else if (ACE_OS::strcasecmp (name, "RW") == 0)
+ {
+ this->wait_strategy_ = TAO_WAIT_ON_READ;
+ }
}
}
- else if (ACE_OS::strcmp (argv[curarg],
- "-ORBTransportMuxStrategy") == 0)
+ else if (ACE_OS::strcmp (argv[curarg], "-ORBrequestmuxstrategy") == 0)
{
curarg++;
if (curarg < argc)
{
char *name = argv[curarg];
- if (ACE_OS::strcasecmp (name,
- "MUXED") == 0)
+ if (ACE_OS::strcasecmp (name, "MUXED") == 0)
this->transport_mux_strategy_ = TAO_MUXED_TMS;
- else if (ACE_OS::strcasecmp (name,
- "EXCLUSIVE") == 0)
+ else if (ACE_OS::strcasecmp (name, "EXCLUSIVE") == 0)
this->transport_mux_strategy_ = TAO_EXCLUSIVE_TMS;
}
}
@@ -114,7 +110,7 @@ TAO_Default_Client_Strategy_Factory::parse_args (int argc, char ** argv)
ACE_Lock *
TAO_Default_Client_Strategy_Factory::create_iiop_profile_lock (void)
{
- ACE_Lock *the_lock = 0;
+ ACE_Lock* the_lock = 0;
if (this->iiop_profile_lock_type_ == TAO_NULL_LOCK)
ACE_NEW_RETURN (the_lock,
@@ -134,22 +130,24 @@ TAO_Default_Client_Strategy_Factory::create_iiop_profile_lock (void)
// -ORBclientconnectionhandler option to implement the WS factory,
// but you need new options for the TMS...
-// Create the correct client transport muxing strategy.
+// Create the correct client request muxing strategy.
TAO_Transport_Mux_Strategy *
TAO_Default_Client_Strategy_Factory::create_transport_mux_strategy (void)
{
TAO_Transport_Mux_Strategy *tms = 0;
- //if (this->transport_mux_strategy_ == TAO_MUXED_TMS)
- //ACE_NEW_RETURN (tms,
- // TAO_Muxed_TMS,
- // 0);
- //else
-
- // @@ Alex: Always creating Exclusive TMS. (Alex).
- ACE_NEW_RETURN (tms,
- TAO_Exclusive_TMS,
- 0);
+ if (this->transport_mux_strategy_ == TAO_MUXED_TMS)
+ {
+ ACE_NEW_RETURN (tms,
+ TAO_Muxed_TMS,
+ 0);
+ }
+ else
+ {
+ ACE_NEW_RETURN (tms,
+ TAO_Exclusive_TMS,
+ 0);
+ }
return tms;
}
@@ -160,17 +158,23 @@ TAO_Default_Client_Strategy_Factory::create_wait_strategy (TAO_Transport *transp
TAO_Wait_Strategy *ws = 0;
if (this->wait_strategy_ == TAO_WAIT_ON_READ)
- ACE_NEW_RETURN (ws,
- TAO_Wait_On_Read (transport),
- 0);
+ {
+ ACE_NEW_RETURN (ws,
+ TAO_Wait_On_Read (transport),
+ 0);
+ }
else if (this->wait_strategy_ == TAO_WAIT_ON_REACTOR)
- ACE_NEW_RETURN (ws,
- TAO_Wait_On_Reactor (transport),
- 0);
+ {
+ ACE_NEW_RETURN (ws,
+ TAO_Wait_On_Reactor (transport),
+ 0);
+ }
else
- ACE_NEW_RETURN (ws,
- TAO_Wait_On_Leader_Follower (transport),
- 0);
+ {
+ ACE_NEW_RETURN (ws,
+ TAO_Wait_On_Leader_Follower (transport),
+ 0);
+ }
return ws;
}