summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/IceStorm/clock/Publisher.cpp10
-rw-r--r--cpp/demo/IceStorm/clock/README2
-rw-r--r--cpp/demo/IceStorm/clock/Subscriber.cpp10
-rw-r--r--cpp/demo/IceStorm/clock/config10
4 files changed, 14 insertions, 18 deletions
diff --git a/cpp/demo/IceStorm/clock/Publisher.cpp b/cpp/demo/IceStorm/clock/Publisher.cpp
index 703b4859a31..9f850eebc38 100644
--- a/cpp/demo/IceStorm/clock/Publisher.cpp
+++ b/cpp/demo/IceStorm/clock/Publisher.cpp
@@ -34,15 +34,15 @@ int
Publisher::run(int argc, char* argv[])
{
PropertiesPtr properties = communicator()->getProperties();
- const char* refProperty = "IceStorm.TopicManager";
- std::string ref = properties->getProperty(refProperty);
- if (ref.empty())
+ const char* endpointsProperty = "IceStorm.TopicManager.Endpoints";
+ std::string endpoints = properties->getProperty(endpointsProperty);
+ if (endpoints.empty())
{
- cerr << appName() << ": property `" << refProperty << "' not set" << endl;
+ cerr << appName() << ": property `" << endpointsProperty << "' not set" << endl;
return EXIT_FAILURE;
}
- ObjectPrx base = communicator()->stringToProxy(ref);
+ ObjectPrx base = communicator()->stringToProxy("TopicManager:" + endpoints);
TopicManagerPrx manager = TopicManagerPrx::checkedCast(base);
if (!manager)
{
diff --git a/cpp/demo/IceStorm/clock/README b/cpp/demo/IceStorm/clock/README
index 873272713c5..a7840292766 100644
--- a/cpp/demo/IceStorm/clock/README
+++ b/cpp/demo/IceStorm/clock/README
@@ -8,6 +8,8 @@ Start the IceStorm daemon:
../../bin/icestorm
+This currently assumes there is a directory called db in the cwd.
+
In a seperate window:
../../../bin/icestormadmin -e "create time"
diff --git a/cpp/demo/IceStorm/clock/Subscriber.cpp b/cpp/demo/IceStorm/clock/Subscriber.cpp
index 6e817f3da11..40145cbd239 100644
--- a/cpp/demo/IceStorm/clock/Subscriber.cpp
+++ b/cpp/demo/IceStorm/clock/Subscriber.cpp
@@ -34,15 +34,15 @@ int
Subscriber::run(int argc, char* argv[])
{
Ice::PropertiesPtr properties = communicator()->getProperties();
- const char* refProperty = "IceStorm.TopicManager";
- std::string ref = properties->getProperty(refProperty);
- if (ref.empty())
+ const char* endpointsProperty = "IceStorm.TopicManager.Endpoints";
+ std::string endpoints = properties->getProperty(endpointsProperty);
+ if (endpoints.empty())
{
- cerr << appName() << ": property `" << refProperty << "' not set" << endl;
+ cerr << appName() << ": property `" << endpointsProperty << "' not set" << endl;
return EXIT_FAILURE;
}
- Ice::ObjectPrx base = communicator()->stringToProxy(ref);
+ ObjectPrx base = communicator()->stringToProxy("TopicManager:" + endpoints);
IceStorm::TopicManagerPrx manager = IceStorm::TopicManagerPrx::checkedCast(base);
if (!manager)
{
diff --git a/cpp/demo/IceStorm/clock/config b/cpp/demo/IceStorm/clock/config
index bbb24b2ad81..e3bb673d502 100644
--- a/cpp/demo/IceStorm/clock/config
+++ b/cpp/demo/IceStorm/clock/config
@@ -1,12 +1,6 @@
#
-# The client reads this property to create the reference to the
-# "TopicManager" object in the server.
-#
-IceStorm.TopicManager=TopicManager:tcp -h localhost -p 10000
-
-#
-# This property sets the endpoint for the TopicManager. The port
-# number must match the above.
+# This property defines the endpoints on which the IceStorm
+# TopicManager listens.
#
IceStorm.TopicManager.Endpoints=tcp -p 10000