summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordoccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-08 17:00:14 +0000
committerdoccvs <doccvs@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-05-08 17:00:14 +0000
commit51069f785181c3e60992d3cc3ac08081b89a7252 (patch)
tree6a911967485729e0666f1896b2629fecc8cca6dd
parent47169adbb2a545c55fb21c84fe355340161193b0 (diff)
downloadATCD-51069f785181c3e60992d3cc3ac08081b89a7252.tar.gz
ChangeLogTag: Tue May 8 09:42:02 2001 Priyanka Gontla <pgontla@ece.uci.edu>
-rw-r--r--TAO/ChangeLogs/ChangeLog-02a6
-rw-r--r--TAO/tao/CORBALOC_Parser.cpp47
2 files changed, 30 insertions, 23 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a
index 963d31905a4..588ea234847 100644
--- a/TAO/ChangeLogs/ChangeLog-02a
+++ b/TAO/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,9 @@
+Tue May 8 09:42:02 2001 Priyanka Gontla <pgontla@ece.uci.edu>
+
+ * tao/CORBALOC_Parser.cpp (check_prefix):
+ Provided another test case for the null prefix
+ in the check_prefix list.
+
Tue May 8 08:56:32 2001 Ossama Othman <ossama@uci.edu>
* tao/Object_Ref_Table.cpp (TAO_Object_Ref_Table):
diff --git a/TAO/tao/CORBALOC_Parser.cpp b/TAO/tao/CORBALOC_Parser.cpp
index aa9faa3cace..0c1502292f7 100644
--- a/TAO/tao/CORBALOC_Parser.cpp
+++ b/TAO/tao/CORBALOC_Parser.cpp
@@ -369,40 +369,39 @@ TAO_CORBALOC_Parser::check_prefix (const char *end_point,
if (!end_point || !*end_point)
return -1; // Failure
- // Lets first check if it is a valid protocol:
- if (!(ACE_OS::strncmp (end_point,
- iiop_prefix,
- sizeof iiop_prefix - 1) == 0) ||
-
- (ACE_OS::strncmp (end_point,
- shmiop_prefix,
- sizeof shmiop_prefix - 1) == 0) ||
-
- (ACE_OS::strncmp (end_point,
- uiop_prefix,
- sizeof uiop_prefix - 1) == 0) ||
+ const char *protocol[] = {"rir:"};
+ size_t slot = ACE_OS::strchr (end_point, '/') - end_point;
+ size_t colon_slot = ACE_OS::strchr (end_point, ':') - end_point;
+ size_t len0 = ACE_OS::strlen (protocol[0]);
- (ACE_OS::strncmp (end_point,
- rir_prefix,
- sizeof rir_prefix - 1) == 0))
+ // Lets first check if it is a valid protocol:
+ if (colon_slot != 0 &&
+ !((ACE_OS::strncmp (end_point,
+ iiop_prefix,
+ sizeof iiop_prefix - 1) == 0) ||
+
+ (ACE_OS::strncmp (end_point,
+ shmiop_prefix,
+ sizeof shmiop_prefix - 1) == 0) ||
+
+ (ACE_OS::strncmp (end_point,
+ uiop_prefix,
+ sizeof uiop_prefix - 1) == 0) ||
+
+ (ACE_OS::strncmp (end_point,
+ rir_prefix,
+ sizeof rir_prefix - 1) == 0)))
{
-
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("TAO (%P|%t) ")
ACE_TEXT ("no usable transport protocol ")
ACE_TEXT ("was found.\n")));
-
+
ACE_THROW_RETURN (CORBA::BAD_PARAM (TAO_OMG_VMCID | 10,
CORBA::COMPLETED_NO),
-1);
}
- const char *protocol[] = {"rir:"};
-
- size_t slot = ACE_OS::strchr (end_point, '/') - end_point;
-
- size_t len0 = ACE_OS::strlen (protocol[0]);
-
// 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 (slot == len0
@@ -420,6 +419,8 @@ TAO_CORBALOC_Parser::parse_string (const char *ior,
{
/// MProfile which consists of the profiles for each endpoint.
TAO_MProfile mprofile;
+
+ cout << __FILE__ << __LINE__ << endl;
// Skip the prefix. We know it is there because this method is only
// called if match_prefix() returns 1.