summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples/qmf-agent
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-12-18 14:29:26 +0000
committerTed Ross <tross@apache.org>2008-12-18 14:29:26 +0000
commit85ac83d0f66f6296ba4b72df234f5fe5326733ec (patch)
treee8775599b8cf24aaeb95cb1c83d8aff0c494d9fd /qpid/cpp/examples/qmf-agent
parent1e4fd5eaa140f5841d706cd9cf6999688b610c97 (diff)
downloadqpid-python-85ac83d0f66f6296ba4b72df234f5fe5326733ec.tar.gz
Added a general ConnectionSettings alternative for agent initialization.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@727726 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/qmf-agent')
-rw-r--r--qpid/cpp/examples/qmf-agent/example.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qpid/cpp/examples/qmf-agent/example.cpp b/qpid/cpp/examples/qmf-agent/example.cpp
index 8c47a0c366..4dec014370 100644
--- a/qpid/cpp/examples/qmf-agent/example.cpp
+++ b/qpid/cpp/examples/qmf-agent/example.cpp
@@ -164,6 +164,10 @@ int main_int(int argc, char** argv)
singleton = new ManagementAgent::Singleton();
const char* host = argc>1 ? argv[1] : "127.0.0.1";
int port = argc>2 ? atoi(argv[2]) : 5672;
+ qpid::client::ConnectionSettings settings;
+
+ settings.host = host;
+ settings.port = port;
signal(SIGINT, shutdown);
@@ -175,7 +179,7 @@ int main_int(int argc, char** argv)
// Start the agent. It will attempt to make a connection to the
// management broker
- agent->init(string(host), port, 5, false, ".magentdata");
+ agent->init(settings, 5, false, ".magentdata");
// Allocate some core objects
CoreClass core1(agent, "Example Core Object #1");