summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/windows/QpiddBroker.cpp
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2010-01-27 22:06:52 +0000
committerStephen D. Huston <shuston@apache.org>2010-01-27 22:06:52 +0000
commit2c8142f6b92f10f3bdbff3ea1d9e946aabb2618a (patch)
treeed73a2b421de1380bf4fc730f289b76f60fecef7 /qpid/cpp/src/windows/QpiddBroker.cpp
parentf8a4f81f5abf33c8b5a76915b428656b221a826a (diff)
downloadqpid-python-2c8142f6b92f10f3bdbff3ea1d9e946aabb2618a.tar.gz
Write the correct port number to stdout when starting up. Resolves QPID-2366.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@903862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/windows/QpiddBroker.cpp')
-rw-r--r--qpid/cpp/src/windows/QpiddBroker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/windows/QpiddBroker.cpp b/qpid/cpp/src/windows/QpiddBroker.cpp
index 15380dda0b..e221551575 100644
--- a/qpid/cpp/src/windows/QpiddBroker.cpp
+++ b/qpid/cpp/src/windows/QpiddBroker.cpp
@@ -210,17 +210,17 @@ struct BrokerInfo {
struct ProcessControlOptions : public qpid::Options {
bool quit;
bool check;
- //std::string transport; No transport options yet - TCP is it.
+ std::string transport;
ProcessControlOptions()
: qpid::Options("Process control options"),
quit(false),
- check(false) //, transport(TCP)
+ check(false),
+ transport(TCP)
{
- // Only have TCP for now, so don't need this...
- // ("transport", optValue(transport, "TRANSPORT"), "The transport for which to return the port")
addOptions()
("check,c", qpid::optValue(check), "Prints the broker's process ID to stdout and returns 0 if the broker is running, otherwise returns 1")
+ ("transport", qpid::optValue(transport, "TRANSPORT"), "The transport for which to return the port")
("quit,q", qpid::optValue(quit), "Tells the broker to shut down");
}
};
@@ -283,7 +283,7 @@ int QpiddBroker::execute (QpiddOptions *options) {
// Need the correct port number to use in the pid file name.
if (options->broker.port == 0)
- options->broker.port = brokerPtr->getPort("");
+ options->broker.port = brokerPtr->getPort(myOptions->control.transport);
BrokerInfo info;
info.pid = ::GetCurrentProcessId();