diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp | 4 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/BrokerFixture.h | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/ClientSessionTest.cpp | 2 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/MessagingFixture.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp index ca33b49249..76774ec257 100644 --- a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp +++ b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp @@ -272,10 +272,10 @@ void CyrusAuthenticator::init() */ int code; - const char *realm = connection.getBroker().getRealm().c_str(); + std::string realm = connection.getBroker().getRealm(); code = sasl_server_new(BROKER_SASL_NAME, /* Service name */ NULL, /* Server FQDN, gethostname() */ - realm, /* Authentication realm */ + realm.c_str(), /* Authentication realm */ NULL, /* Local IP, needed for some mechanism */ NULL, /* Remote IP, needed for some mechanism */ NULL, /* Callbacks */ diff --git a/qpid/cpp/src/tests/BrokerFixture.h b/qpid/cpp/src/tests/BrokerFixture.h index 90b2dc47e0..9cf325587a 100644 --- a/qpid/cpp/src/tests/BrokerFixture.h +++ b/qpid/cpp/src/tests/BrokerFixture.h @@ -152,7 +152,7 @@ typedef ClientT<> Client; template <class ConnectionType, class SessionType=qpid::client::Session> struct SessionFixtureT : BrokerFixture, ClientT<ConnectionType,SessionType> { - SessionFixtureT(BrokerOptions opts=BrokerOptions()) : + SessionFixtureT(const BrokerOptions& opts=BrokerOptions()) : BrokerFixture(BrokerFixture::Args(), opts), ClientT<ConnectionType,SessionType>(getPort()) {} diff --git a/qpid/cpp/src/tests/ClientSessionTest.cpp b/qpid/cpp/src/tests/ClientSessionTest.cpp index 6cd63e7f04..f35524c0c0 100644 --- a/qpid/cpp/src/tests/ClientSessionTest.cpp +++ b/qpid/cpp/src/tests/ClientSessionTest.cpp @@ -105,7 +105,7 @@ struct SimpleListener : public MessageListener struct ClientSessionFixture : public SessionFixture { - ClientSessionFixture(BrokerOptions opts = BrokerOptions()) : SessionFixture(opts) { + ClientSessionFixture(const BrokerOptions& opts = BrokerOptions()) : SessionFixture(opts) { session.queueDeclare(arg::queue="my-queue"); } }; diff --git a/qpid/cpp/src/tests/MessagingFixture.h b/qpid/cpp/src/tests/MessagingFixture.h index 2d780fea14..165aefeeec 100644 --- a/qpid/cpp/src/tests/MessagingFixture.h +++ b/qpid/cpp/src/tests/MessagingFixture.h @@ -103,7 +103,7 @@ struct MessagingFixture : public BrokerFixture messaging::Session session; BrokerAdmin admin; - MessagingFixture(BrokerOptions opts = BrokerOptions(), bool mgmtEnabled=false) : + MessagingFixture(const BrokerOptions& opts = BrokerOptions(), bool mgmtEnabled=false) : BrokerFixture(opts, mgmtEnabled), connection(open(broker->getPort(Broker::TCP_TRANSPORT))), session(connection.createSession()), |
