summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-09-21 17:44:02 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-09-21 17:44:02 +0000
commitfe34ec35a23bd4c89f92f78f86db002894732a4f (patch)
tree8cb52e65a694d100fc75101bdb948a94796b4c8f
parenta2f897ebd40ff1c51bec62dcbb156d3282a39ac6 (diff)
downloadATCD-fe34ec35a23bd4c89f92f78f86db002894732a4f.tar.gz
ChangeLogTag:Sat Sep 21 12:42:25 2002 Ossama Othman <ossama@uci.edu>
-rw-r--r--TAO/ChangeLog9
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp9
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h17
3 files changed, 26 insertions, 9 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 1423a31307c..44001aecd67 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,12 @@
+Sat Sep 21 12:42:25 2002 Ossama Othman <ossama@uci.edu>
+
+ * orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h:
+ * orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp (to_name):
+ (to_name_helper):
+
+ Applied Carlos' patch that fixes to_name() operation crashes
+ with some strings (a blocker bug). [Bug 1224]
+
Fri Sep 20 12:53:58 2002 Ossama Othman <ossama@uci.edu>
* orbsvcs/orbsvcs/LoadBalancing/LB_CPU_Monitor.cpp (loads):
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp
index 7b83b34e9b3..3f208c79501 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.cpp
@@ -257,12 +257,11 @@ TAO_Naming_Context::to_string (const CosNaming::Name &n
void
TAO_Naming_Context::
-to_name_helper (char *dest, const char*& src)
+to_name_helper (char *dest, const char*& src, Hint hint)
{
for (; *src != '\0'; ++src, ++dest)
{
-
- if (*src == '.' || *src == '/')
+ if ((hint == HINT_ID && *src == '.') || *src == '/')
{
*dest = '\0';
return;
@@ -351,13 +350,13 @@ TAO_Naming_Context::to_name (const char *sn
char *kind = CORBA::string_alloc (len);
// Assign to the id.
- this->to_name_helper (id, k);
+ this->to_name_helper (id, k, HINT_ID);
if (*k == '.')
{
k++;
// Assign to kind
- this->to_name_helper (kind, k);
+ this->to_name_helper (kind, k, HINT_KIND);
}
else
{
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h
index 87311dac912..03c18e1ffef 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h
+++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Context_Interface.h
@@ -1,4 +1,5 @@
-/* -*- C++ -*- */
+// -*- C++ -*-
+
//=============================================================================
/**
* @file Naming_Context_Interface.h
@@ -9,11 +10,13 @@
*/
//=============================================================================
-
#ifndef TAO_NAMING_CONTEXT_INTERFACE_H
#define TAO_NAMING_CONTEXT_INTERFACE_H
+
#include "ace/pre.h"
+
#include "orbsvcs/CosNamingS.h"
+
#include "naming_export.h"
class TAO_Naming_Context_Impl;
@@ -243,6 +246,12 @@ public:
private:
+ enum Hint
+ {
+ HINT_ID,
+ HINT_KIND
+ };
+
/**
* This private function is used as a helper to <to_name>. It reads
* character by character from 'src' and depending on the character,
@@ -251,7 +260,7 @@ private:
* 'kind' fields or a seperator between two name components, the
* control is returned back to the calling function <to_name>.
*/
- void to_name_helper (char *dest, const char*& src);
+ void to_name_helper (char *dest, const char*& src, Hint hint);
/**
* This method functions similar to <to_name_helper>. If the
@@ -405,6 +414,6 @@ public:
virtual PortableServer::POA_ptr _default_POA (void) = 0;
};
-
#include "ace/post.h"
+
#endif /* TAO_NAMING_CONTEXT_INTERFACE_H */