summaryrefslogtreecommitdiff
path: root/cpp/src
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
commitd68f4fc71cd9b7db52779e0358b6830828834076 (patch)
tree703a7af9940cc780ca38f2330354ac69f0148802 /cpp/src
parentcf480cf05ea22595e2968ae6c5fdd6d6c78b44c2 (diff)
downloadqpid-python-d68f4fc71cd9b7db52779e0358b6830828834076.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/qpid@903862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/windows/QpiddBroker.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/windows/QpiddBroker.cpp b/cpp/src/windows/QpiddBroker.cpp
index 15380dda0b..e221551575 100644
--- a/cpp/src/windows/QpiddBroker.cpp
+++ b/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();