summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2001-12-06 14:48:37 +0000
committerMatthew Newhook <matthew@zeroc.com>2001-12-06 14:48:37 +0000
commitf7747bf15ca3ae39b55eb8a18b436371767710f8 (patch)
tree9922a94ea4980e848b003e2475532fa85e829b58 /cpp/src
parentfixes (diff)
downloadice-f7747bf15ca3ae39b55eb8a18b436371767710f8.tar.bz2
ice-f7747bf15ca3ae39b55eb8a18b436371767710f8.tar.xz
ice-f7747bf15ca3ae39b55eb8a18b436371767710f8.zip
Fix identityToString bug.
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/IdentityUtil.cpp2
-rw-r--r--cpp/src/IceStorm/TopicI.cpp15
-rw-r--r--cpp/src/IceStorm/TopicManagerI.cpp7
3 files changed, 19 insertions, 5 deletions
diff --git a/cpp/src/Ice/IdentityUtil.cpp b/cpp/src/Ice/IdentityUtil.cpp
index 06ae1b821e5..4dc378b3edf 100644
--- a/cpp/src/Ice/IdentityUtil.cpp
+++ b/cpp/src/Ice/IdentityUtil.cpp
@@ -28,7 +28,7 @@ Ice::stringToIdentity(const string& s)
if (pos != string::npos)
{
ident.category = s.substr(0, pos);
- ident.name = s.substr(pos);
+ ident.name = s.substr(pos+1);
}
else
{
diff --git a/cpp/src/IceStorm/TopicI.cpp b/cpp/src/IceStorm/TopicI.cpp
index c84d55b6dd1..8c952cb932f 100644
--- a/cpp/src/IceStorm/TopicI.cpp
+++ b/cpp/src/IceStorm/TopicI.cpp
@@ -140,7 +140,7 @@ public:
// (see Meyers for details). If this is fixed then fix Flusher
// also.
//
- // remove_if doesn't work with handle types. remove_if also //
+ // remove_if doesn't work with handle types. remove_if also
// isn't present in the STLport implementation
//
// _subscribers.remove_if(IceUtil::constMemFun(&Subscriber::invalid));
@@ -152,7 +152,10 @@ public:
{
(*i)->publish(op, nonmutating, blob);
}
- //for_each(_subscribers.begin(), _subscribers.end(), Ice::memFun(&Subscriber::publish));
+ //
+ // TODO:
+ // for_each(_subscribers.begin(), _subscribers.end(), Ice::memFun(&Subscriber::publish));
+ //
}
private:
@@ -186,8 +189,8 @@ TopicI::TopicI(const Ice::ObjectAdapterPtr& adapter, const TraceLevelsPtr& trace
//
// Create a servant per Topic to receive event data. The servants
- // object-id is <topic>#publish. Active the object and save a
- // reference to give to publishers.
+ // Identity is category=<topicname>, name=publish. Activate the
+ // object and save a reference to give to publishers.
//
_publisher = new BlobjectI(_subscribers);
@@ -218,6 +221,10 @@ TopicI::destroy(const Ice::Current&)
{
JTCSyncT<JTCMutex> sync(_destroyedMutex);
+ //
+ // See the comment in the constructor for the derevation of the
+ // Identity.
+ //
Ice::Identity id;
id.category = _name;
id.name = "publish";
diff --git a/cpp/src/IceStorm/TopicManagerI.cpp b/cpp/src/IceStorm/TopicManagerI.cpp
index 8abc1a2b867..161f271ff7a 100644
--- a/cpp/src/IceStorm/TopicManagerI.cpp
+++ b/cpp/src/IceStorm/TopicManagerI.cpp
@@ -62,6 +62,9 @@ TopicManagerI::create(const string& name, const Ice::Current&)
installTopic("create", name);
_topics.insert(make_pair(name, true));
+ //
+ // The identity is the name of the Topic.
+ //
Ice::Identity id;
id.name = name;
return TopicPrx::uncheckedCast(_adapter->createProxy(id));
@@ -263,6 +266,10 @@ TopicManagerI::installTopic(const std::string& message, const std::string& name)
// Create topic implementation
//
TopicIPtr topicI = new TopicI(_adapter, _traceLevels, _communicator->getLogger(), name, _flusher);
+
+ //
+ // The identity is the name of the Topic.
+ //
Ice::Identity id;
id.name = name;
_adapter->add(topicI, id);