summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Connect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IIOP_Connect.cpp')
-rw-r--r--TAO/tao/IIOP_Connect.cpp44
1 files changed, 37 insertions, 7 deletions
diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp
index 8f0e3adb3e0..37bbab370ac 100644
--- a/TAO/tao/IIOP_Connect.cpp
+++ b/TAO/tao/IIOP_Connect.cpp
@@ -337,14 +337,10 @@ TAO_IIOP_Client_Connection_Handler (ACE_Thread_Manager *t,
TAO_ORB_Core* orb_core)
: TAO_IIOP_Handler_Base (t),
transport_ (this, orb_core),
- orb_core_ (orb_core)
+ orb_core_ (orb_core),
+ mesg_factory_ (0)
{
- // OK, Here is a small twist. By now the all the objecs cached in
- // this class would have been constructed. But we would like to make
- // the one of the objects, precisely the transport object a pointer
- // to the Messaging object. So, we set this up properly by calling
- // the messaging_init method on the transport.
- this->transport_.messaging_init (& this->message_factory_);
+ //no-op
}
TAO_IIOP_Client_Connection_Handler::~TAO_IIOP_Client_Connection_Handler (void)
@@ -538,6 +534,40 @@ TAO_IIOP_Client_Connection_Handler::handle_cleanup (void)
return 0;
}
+int
+TAO_IIOP_Client_Connection_Handler::
+ init_mesg_protocol (CORBA::Octet major,
+ CORBA::Octet minor)
+{
+ if (minor > TAO_DEF_GIOP_MINOR)
+ minor = TAO_DEF_GIOP_MINOR;
+ switch (minor)
+ {
+ case 0:
+ ACE_NEW_RETURN (this->mesg_factory_,
+ TAO_GIOP_Message_Connector_10,
+ 0);
+ break;
+ case 1:
+ ACE_NEW_RETURN (this->mesg_factory_,
+ TAO_GIOP_Message_Connector_11,
+ 0);
+ break;
+ default:
+ if (TAO_debug_level > 0)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ASYS_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")),
+ 0);
+ }
+ }
+
+ // Make the transport know
+ this->transport_.messaging_init (this->mesg_factory_);
+
+ return 1;
+}
+
// ****************************************************************
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)