summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/posix
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-06-18 21:09:19 +0000
committerAlan Conway <aconway@apache.org>2013-06-18 21:09:19 +0000
commitdcbe230a40f223d1e651cbd5d5626dee8d5c71b7 (patch)
tree3d295b317de94e8fc797a199d2e12867f0a3969e /qpid/cpp/src/posix
parenta6db7e3f3bcac613b0ede002355b273cc1e6a8f9 (diff)
downloadqpid-python-dcbe230a40f223d1e651cbd5d5626dee8d5c71b7.tar.gz
QPID-4745: Alternative port allocation for tests, instead of 'qpidd --port=0'
qpidd-p0 script binds a new port to a socket using bind(0), and then execs qpidd using the --socket-fd option to pass the socket to qpidd. It is intended to replace /path/to/qpidd --port 0 <args...> with qpidd-p0 /path/to/qpidd <args...> Most tests do not yet use qpidd-p0, they will be updated in a future commit. Changes: - Added qpidd-p0 - Fixed qpidd port printing logic: print port only if --port=0, regardless of --transport. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1494306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/posix')
-rw-r--r--qpid/cpp/src/posix/QpiddBroker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qpid/cpp/src/posix/QpiddBroker.cpp b/qpid/cpp/src/posix/QpiddBroker.cpp
index 1968cbb588..831b2e0641 100644
--- a/qpid/cpp/src/posix/QpiddBroker.cpp
+++ b/qpid/cpp/src/posix/QpiddBroker.cpp
@@ -132,8 +132,8 @@ struct QpiddDaemon : public Daemon {
/** Code for parent process */
void parent() {
uint16_t port = wait(options->daemon.wait);
- if (options->parent->broker.port == 0 || options->daemon.transport != TCP)
- cout << port << endl;
+ if (options->parent->broker.port == 0
+ ) cout << port << endl;
}
/** Code for forked child process */
@@ -196,7 +196,7 @@ int QpiddBroker::execute (QpiddOptions *options) {
boost::intrusive_ptr<Broker> brokerPtr(new Broker(options->broker));
ScopedSetBroker ssb(brokerPtr);
brokerPtr->accept();
- if (options->broker.port == 0 || myOptions->daemon.transport != TCP) {
+ if (options->broker.port == 0) {
uint16_t port = brokerPtr->getPort(myOptions->daemon.transport);
cout << port << endl;
if (options->broker.enableMgmt) {