summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-05-25 17:10:48 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-05-25 17:10:48 +0000
commitbef3ddd66b9fd497d4b150b152add520de1e0f35 (patch)
treeeca1a88fc68eaf0a9c1b2c4c1ec3ea2f7250e1c7
parent1d34e64a8023d95b0e6602f5195ccd3dbd87fbed (diff)
downloadATCD-bef3ddd66b9fd497d4b150b152add520de1e0f35.tar.gz
Minor bugfixes
-rw-r--r--TAO/tao/IIOP_Connector.cpp25
-rw-r--r--TAO/tao/IIOP_Factory.cpp8
-rw-r--r--TAO/tao/Makefile97
-rw-r--r--TAO/tao/UIOP_Acceptor.cpp17
-rw-r--r--TAO/tao/UIOP_Acceptor.h4
-rw-r--r--TAO/tao/UIOP_Connector.cpp23
-rw-r--r--TAO/tao/UIOP_Factory.cpp7
-rw-r--r--TAO/tao/UIOP_Profile.cpp31
-rw-r--r--TAO/tao/UIOP_Profile.h4
9 files changed, 124 insertions, 92 deletions
diff --git a/TAO/tao/IIOP_Connector.cpp b/TAO/tao/IIOP_Connector.cpp
index dadcb2fc587..1e42eba5b1c 100644
--- a/TAO/tao/IIOP_Connector.cpp
+++ b/TAO/tao/IIOP_Connector.cpp
@@ -241,31 +241,24 @@ TAO_IIOP_Connector::make_profile (const char *endpoint,
int
TAO_IIOP_Connector::check_prefix (const char *endpoint)
{
- // Parse the given URL style IOR and create an mprofile from it.
-
// Check for a valid string
if (!endpoint || !*endpoint)
- return 1; // Failure
-
- const char protocol[] = "iiop";
- // This is valid for any protocol beginning with `iiop'.
+ return -1; // Failure
+ const char *protocol[] = { "iiop", "iioploc" };
+ // This is valid for any protocol beginning with `iiop' or `iioploc'.
// Check for the proper prefix in the IOR. If the proper prefix isn't
// in the IOR then it is not an IOR we can use.
- if (ACE_OS::strncasecmp (endpoint,
- protocol,
- ACE_OS::strlen (protocol)) == 0)
+ if (ACE_OS::strcasecmp (endpoint, protocol[0]) == 0 ||
+ ACE_OS::strcasecmp (endpoint, protocol[1]) == 0)
{
return 0; // Success
}
- else
- {
- return 1;
- // Failure: not an IIOP IOR
- // DO NOT throw an exception here.
- }
- // @@ Fred&Ossama: Could we just write return 1 outside the else?
+
+ return -1;
+ // Failure: not an IIOP IOR
+ // DO NOT throw an exception here.
}
diff --git a/TAO/tao/IIOP_Factory.cpp b/TAO/tao/IIOP_Factory.cpp
index a07ea60ad7c..5dcc786ee31 100644
--- a/TAO/tao/IIOP_Factory.cpp
+++ b/TAO/tao/IIOP_Factory.cpp
@@ -19,9 +19,13 @@ TAO_IIOP_Protocol_Factory::~TAO_IIOP_Protocol_Factory (void)
int
TAO_IIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
{
- const ACE_CString this_prefix ("iiop");
+ const char *protocol[] = { "iiop", "iioploc" };
+ // This is valid for any protocol beginning with `iiop' or `iioploc'.
- return prefix == this_prefix;
+ // Check for the proper prefix in the IOR. If the proper prefix isn't
+ // in the IOR then it is not an IOR we can use.
+ return (ACE_OS::strcasecmp (prefix.c_str (), protocol[0]) == 0 ||
+ ACE_OS::strcasecmp (prefix.c_str (), protocol[1]) == 0);
}
TAO_Acceptor *
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index 7a4781ba668..b51efcd505a 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -7875,28 +7875,26 @@ realclean:
$(TAO_ROOT)/tao/Object_KeyC.h \
$(TAO_ROOT)/tao/Object_KeyC.i \
$(TAO_ROOT)/tao/IIOP_Profile.i \
- $(TAO_ROOT)/tao/GIOP.h \
- $(TAO_ROOT)/tao/GIOP.i \
- $(TAO_ROOT)/tao/ORB_Core.h \
- $(ACE_ROOT)/ace/Singleton.h \
- $(ACE_ROOT)/ace/Singleton.i \
- $(ACE_ROOT)/ace/Singleton.cpp \
- $(TAO_ROOT)/tao/Policy_Manager.h \
- $(TAO_ROOT)/tao/POA_CORBA.h \
- $(TAO_ROOT)/tao/DynAnyC.h \
- $(TAO_ROOT)/tao/DynAnyC.i \
- $(TAO_ROOT)/tao/DomainC.h \
- $(TAO_ROOT)/tao/DomainC.i \
- $(TAO_ROOT)/tao/Policy_Manager.i \
- $(TAO_ROOT)/tao/Resource_Factory.h \
- $(TAO_ROOT)/tao/Protocol_Factory.h \
- $(ACE_ROOT)/ace/Strategies_T.h \
- $(ACE_ROOT)/ace/Strategies.h \
- $(ACE_ROOT)/ace/Strategies.i \
+ $(TAO_ROOT)/tao/UIOP_Profile.h \
+ $(ACE_ROOT)/ace/UNIX_Addr.h \
+ $(ACE_ROOT)/ace/UNIX_Addr.i \
+ $(TAO_ROOT)/tao/UIOP_Connect.h \
+ $(ACE_ROOT)/ace/Acceptor.h \
+ $(ACE_ROOT)/ace/Svc_Handler.h \
$(ACE_ROOT)/ace/Synch_Options.h \
$(ACE_ROOT)/ace/Synch_Options.i \
+ $(ACE_ROOT)/ace/Task.h \
$(ACE_ROOT)/ace/Thread_Manager.h \
$(ACE_ROOT)/ace/Thread_Manager.i \
+ $(ACE_ROOT)/ace/Task.i \
+ $(ACE_ROOT)/ace/Task_T.h \
+ $(ACE_ROOT)/ace/Message_Queue.h \
+ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
+ $(ACE_ROOT)/ace/Message_Queue_T.h \
+ $(ACE_ROOT)/ace/Message_Queue_T.i \
+ $(ACE_ROOT)/ace/Message_Queue_T.cpp \
+ $(ACE_ROOT)/ace/Strategies.h \
+ $(ACE_ROOT)/ace/Strategies_T.h \
$(ACE_ROOT)/ace/Strategies_T.i \
$(ACE_ROOT)/ace/Strategies_T.cpp \
$(ACE_ROOT)/ace/Service_Repository.h \
@@ -7904,22 +7902,9 @@ realclean:
$(ACE_ROOT)/ace/Service_Types.i \
$(ACE_ROOT)/ace/Service_Repository.i \
$(ACE_ROOT)/ace/WFMO_Reactor.h \
- $(ACE_ROOT)/ace/Message_Queue.h \
- $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
- $(ACE_ROOT)/ace/Message_Queue_T.h \
- $(ACE_ROOT)/ace/Message_Queue_T.i \
- $(ACE_ROOT)/ace/Message_Queue_T.cpp \
- $(ACE_ROOT)/ace/Message_Queue.i \
$(ACE_ROOT)/ace/WFMO_Reactor.i \
- $(TAO_ROOT)/tao/IIOP_Connector.h \
- $(ACE_ROOT)/ace/Connector.h \
- $(ACE_ROOT)/ace/Map_Manager.h \
- $(ACE_ROOT)/ace/Map_Manager.i \
- $(ACE_ROOT)/ace/Map_Manager.cpp \
- $(ACE_ROOT)/ace/Svc_Handler.h \
- $(ACE_ROOT)/ace/Task.h \
- $(ACE_ROOT)/ace/Task.i \
- $(ACE_ROOT)/ace/Task_T.h \
+ $(ACE_ROOT)/ace/Strategies.i \
+ $(ACE_ROOT)/ace/Message_Queue.i \
$(ACE_ROOT)/ace/Task_T.i \
$(ACE_ROOT)/ace/Task_T.cpp \
$(ACE_ROOT)/ace/Module.h \
@@ -7931,10 +7916,14 @@ realclean:
$(ACE_ROOT)/ace/Svc_Handler.i \
$(ACE_ROOT)/ace/Svc_Handler.cpp \
$(ACE_ROOT)/ace/Dynamic.h \
+ $(ACE_ROOT)/ace/Singleton.h \
+ $(ACE_ROOT)/ace/Singleton.i \
+ $(ACE_ROOT)/ace/Singleton.cpp \
$(ACE_ROOT)/ace/Dynamic.i \
- $(ACE_ROOT)/ace/Connector.i \
- $(ACE_ROOT)/ace/Connector.cpp \
- $(ACE_ROOT)/ace/SOCK_Connector.h \
+ $(ACE_ROOT)/ace/Acceptor.i \
+ $(ACE_ROOT)/ace/Acceptor.cpp \
+ $(ACE_ROOT)/ace/LSOCK_Acceptor.h \
+ $(ACE_ROOT)/ace/SOCK_Acceptor.h \
$(ACE_ROOT)/ace/SOCK_Stream.h \
$(ACE_ROOT)/ace/SOCK_IO.h \
$(ACE_ROOT)/ace/SOCK.h \
@@ -7944,13 +7933,36 @@ realclean:
$(ACE_ROOT)/ace/SOCK_IO.i \
$(ACE_ROOT)/ace/SOCK_Stream.i \
$(ACE_ROOT)/ace/Time_Value.h \
+ $(ACE_ROOT)/ace/SOCK_Acceptor.i \
+ $(ACE_ROOT)/ace/LSOCK_Stream.h \
+ $(ACE_ROOT)/ace/LSOCK.h \
+ $(ACE_ROOT)/ace/LSOCK.i \
+ $(ACE_ROOT)/ace/LSOCK_Stream.i \
+ $(ACE_ROOT)/ace/LSOCK_Acceptor.i \
+ $(TAO_ROOT)/tao/UIOP_Connect.i \
+ $(TAO_ROOT)/tao/UIOP_Profile.i \
+ $(TAO_ROOT)/tao/GIOP.h \
+ $(TAO_ROOT)/tao/GIOP.i \
+ $(TAO_ROOT)/tao/ORB_Core.h \
+ $(TAO_ROOT)/tao/Policy_Manager.h \
+ $(TAO_ROOT)/tao/POA_CORBA.h \
+ $(TAO_ROOT)/tao/DynAnyC.h \
+ $(TAO_ROOT)/tao/DynAnyC.i \
+ $(TAO_ROOT)/tao/DomainC.h \
+ $(TAO_ROOT)/tao/DomainC.i \
+ $(TAO_ROOT)/tao/Policy_Manager.i \
+ $(TAO_ROOT)/tao/Resource_Factory.h \
+ $(TAO_ROOT)/tao/Protocol_Factory.h \
+ $(TAO_ROOT)/tao/IIOP_Connector.h \
+ $(ACE_ROOT)/ace/Connector.h \
+ $(ACE_ROOT)/ace/Map_Manager.h \
+ $(ACE_ROOT)/ace/Map_Manager.i \
+ $(ACE_ROOT)/ace/Map_Manager.cpp \
+ $(ACE_ROOT)/ace/Connector.i \
+ $(ACE_ROOT)/ace/Connector.cpp \
+ $(ACE_ROOT)/ace/SOCK_Connector.h \
$(ACE_ROOT)/ace/SOCK_Connector.i \
$(TAO_ROOT)/tao/Connect.h \
- $(ACE_ROOT)/ace/Acceptor.h \
- $(ACE_ROOT)/ace/Acceptor.i \
- $(ACE_ROOT)/ace/Acceptor.cpp \
- $(ACE_ROOT)/ace/SOCK_Acceptor.h \
- $(ACE_ROOT)/ace/SOCK_Acceptor.i \
$(TAO_ROOT)/tao/Connect.i \
$(TAO_ROOT)/tao/Acceptor_Registry.h \
$(TAO_ROOT)/tao/Connector_Registry.h \
@@ -13020,7 +13032,8 @@ realclean:
$(TAO_ROOT)/tao/Object_Adapter.i \
$(TAO_ROOT)/tao/POA.i \
$(TAO_ROOT)/tao/default_resource.i \
- $(TAO_ROOT)/tao/IIOP_Factory.h
+ $(TAO_ROOT)/tao/IIOP_Factory.h \
+ $(TAO_ROOT)/tao/UIOP_Factory.h
.obj/Typecode_Constants.o .obj/Typecode_Constants.so .shobj/Typecode_Constants.o .shobj/Typecode_Constants.so: Typecode_Constants.cpp \
$(TAO_ROOT)/tao/Typecode.h \
$(ACE_ROOT)/ace/Synch.h \
diff --git a/TAO/tao/UIOP_Acceptor.cpp b/TAO/tao/UIOP_Acceptor.cpp
index 1f8357cddc4..2142301e5fc 100644
--- a/TAO/tao/UIOP_Acceptor.cpp
+++ b/TAO/tao/UIOP_Acceptor.cpp
@@ -43,9 +43,9 @@ int
TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key,
TAO_MProfile &mprofile)
{
- ACE_UNIX_Addr new_address;
+ ACE_UNIX_Addr addr;
- if (base_acceptor_.acceptor ().get_local_addr (new_address) == -1)
+ if (base_acceptor_.acceptor ().get_local_addr (addr) == -1)
return 0;
// we only make one
@@ -58,7 +58,7 @@ TAO_UIOP_Acceptor::create_mprofile (const TAO_ObjectKey &object_key,
TAO_UIOP_Profile *pfile;
ACE_NEW_RETURN (pfile,
- TAO_UIOP_Profile (new_address, object_key),
+ TAO_UIOP_Profile (addr, object_key),
-1);
if (mprofile.give_profile (pfile) == -1)
@@ -99,11 +99,12 @@ TAO_UIOP_Acceptor::open (TAO_ORB_Core *orb_core,
if (this->base_acceptor_.open (
// orb_core->orb_params ()->addr (),
addr,
- orb_core->reactor(),
- &UIOP_Creation_Strategy_,
- &UIOP_Accept_Strategy_,
- &UIOP_Concurrency_Strategy_,
- &UIOP_Scheduling_Strategy_) != 0)
+ orb_core->reactor()//,
+// &UIOP_Creation_Strategy_,
+// &UIOP_Accept_Strategy_,
+// &UIOP_Concurrency_Strategy_,
+// &UIOP_Scheduling_Strategy_
+ ) != 0)
return -1; // Failure
return 0; // Success
diff --git a/TAO/tao/UIOP_Acceptor.h b/TAO/tao/UIOP_Acceptor.h
index ea8404c5b22..2266618ea25 100644
--- a/TAO/tao/UIOP_Acceptor.h
+++ b/TAO/tao/UIOP_Acceptor.h
@@ -39,8 +39,8 @@ typedef ACE_Concurrency_Strategy<TAO_UIOP_Server_Connection_Handler> UIOP_CONCUR
typedef ACE_Scheduling_Strategy<TAO_UIOP_Server_Connection_Handler> UIOP_SCHEDULING_STRATEGY;
// *******************************************************************
-typedef ACE_Strategy_Acceptor<TAO_UIOP_Server_Connection_Handler,
- ACE_LSOCK_ACCEPTOR>
+typedef ACE_Acceptor<TAO_UIOP_Server_Connection_Handler,
+ ACE_LSOCK_ACCEPTOR>
TAO_UIOP_BASE_ACCEPTOR;
// was defined in UIOP_Connect.h
diff --git a/TAO/tao/UIOP_Connector.cpp b/TAO/tao/UIOP_Connector.cpp
index dd829ea221f..6b45226303c 100644
--- a/TAO/tao/UIOP_Connector.cpp
+++ b/TAO/tao/UIOP_Connector.cpp
@@ -230,11 +230,11 @@ TAO_UIOP_Connector::make_profile (const char *endpoint,
{
// The endpoint should be of the form:
//
- // N.n//rendesvouz_point/object_key
+ // N.n//rendezvous_point/object_key
//
// or:
//
- // //rendesvouz_point/object_key
+ // //rendezvous_point/object_key
ACE_NEW_RETURN (profile,
TAO_UIOP_Profile (endpoint, ACE_TRY_ENV),
@@ -251,26 +251,21 @@ TAO_UIOP_Connector::check_prefix (const char *endpoint)
// Check for a valid string
if (!endpoint || !*endpoint)
- return 1; // Failure
+ return -1; // Failure
const char protocol[] = "uiop";
- // This is valid for any protocol beginning with `iiop'.
-
+ // This is valid for any protocol beginning with `uiop'.
// Check for the proper prefix in the IOR. If the proper prefix isn't
// in the IOR then it is not an IOR we can use.
- if (ACE_OS::strncasecmp (endpoint,
- protocol,
- ACE_OS::strlen (protocol)) == 0)
+ if (ACE_OS::strcasecmp (endpoint, protocol) == 0)
{
return 0; // Success
}
- else
- {
- return 1;
- // Failure: not an UIOP IOR
- // DO NOT throw an exception here.
- }
+
+ return -1;
+ // Failure: not an UIOP IOR
+ // DO NOT throw an exception here.
}
diff --git a/TAO/tao/UIOP_Factory.cpp b/TAO/tao/UIOP_Factory.cpp
index 7d99498ec8f..e19aba49dc4 100644
--- a/TAO/tao/UIOP_Factory.cpp
+++ b/TAO/tao/UIOP_Factory.cpp
@@ -22,9 +22,12 @@ TAO_UIOP_Protocol_Factory::~TAO_UIOP_Protocol_Factory (void)
int
TAO_UIOP_Protocol_Factory::match_prefix (const ACE_CString &prefix)
{
- const ACE_CString this_prefix ("uiop");
+ const char protocol[] = "uiop";
+ // This is valid for any protocol beginning with `uiop'.
- return prefix == this_prefix;
+ // Check for the proper prefix in the IOR. If the proper prefix isn't
+ // in the IOR then it is not an IOR we can use.
+ return (ACE_OS::strcasecmp (prefix.c_str (), protocol) == 0);
}
TAO_Acceptor *
diff --git a/TAO/tao/UIOP_Profile.cpp b/TAO/tao/UIOP_Profile.cpp
index 514ded54aae..485f6493d8f 100644
--- a/TAO/tao/UIOP_Profile.cpp
+++ b/TAO/tao/UIOP_Profile.cpp
@@ -259,6 +259,13 @@ TAO_UIOP_Profile::set (const ACE_UNIX_Addr& addr)
ACE_OS::strcpy (this->rendezvous_point_, temp_rendezvous_point);
+// ACE_DEBUG ((LM_DEBUG,
+// "UIOP_Profile::set -- \n"
+// " temp_rendezvous_point: <%s>\n"
+// " rendezvous_point: <%s>\n",
+// temp_rendezvous_point,
+// this->rendezvous_point_));
+
return 0; // Success
}
@@ -281,6 +288,15 @@ TAO_UIOP_Profile::parse (TAO_InputCDR& cdr,
{
CORBA::ULong encap_len = cdr.length ();
+ if (TAO_debug_level > 0)
+ {
+ char *buf = (char *) cdr.rd_ptr (); // ptr to first buffer
+ ACE_HEX_DUMP ((LM_DEBUG,
+ (const char*)buf,
+ encap_len,
+ "\n"));
+ }
+
// Read and verify major, minor versions, ignoring UIOP
// profiles whose versions we don't understand.
// FIXME: Version question again, what do we do about them for this
@@ -327,6 +343,11 @@ TAO_UIOP_Profile::parse (TAO_InputCDR& cdr,
cdr.length (),
encap_len));
}
+
+// ACE_DEBUG ((LM_DEBUG,
+// "UIOP_Profile --- r point: <%s>\n",
+// this->rendezvous_point_));
+
if (cdr.good_bit ())
return 1;
@@ -645,10 +666,8 @@ TAO_UIOP_Profile::encode (TAO_OutputCDR &stream) const
+ 1 // version minor
+ 1 // pad byte
+ 4 // sizeof (strlen)
- + rendezvous_pointlen + 1 // strlen + null
- + (~rendezvous_pointlen & 01) // optional pad byte
- + 2 // port
- + ( rendezvous_pointlen & 02) // optional pad short
+ + rendezvous_pointlen + 1 // strlen + null
+ + (~rendezvous_pointlen & 0x3) // optional pad short
+ 4 // sizeof (key length)
+ this->object_key_.length (); // key length.
stream.write_ulong (encap_len);
@@ -663,6 +682,10 @@ TAO_UIOP_Profile::encode (TAO_OutputCDR &stream) const
// STRING rendezvous_pointname from profile
stream.write_string (this->rendezvous_point_);
+// ACE_DEBUG ((LM_DEBUG,
+// "UIOP_Profile::encode -- rendezvous point: <%s>\n",
+// this->rendezvous_point_));
+
// OCTET SEQUENCE for object key
stream << this->object_key_;
diff --git a/TAO/tao/UIOP_Profile.h b/TAO/tao/UIOP_Profile.h
index 25cb4e75d04..02e2ed89183 100644
--- a/TAO/tao/UIOP_Profile.h
+++ b/TAO/tao/UIOP_Profile.h
@@ -42,10 +42,10 @@ class TAO_Export TAO_UIOP_Profile : public TAO_Profile
// = DESCRIPTION
// This class defines the UIOP profile.
public:
- // = Currently, TAO supports UIOP 0.0.
+ // = Currently, TAO supports UIOP 1.0.
enum
{
- DEF_UIOP_MAJOR = 0, // FIXME: Version numbers?
+ DEF_UIOP_MAJOR = 1, // FIXME: Version numbers?
DEF_UIOP_MINOR = 0
};