This is an automated email from the ASF dual-hosted git repository. gsim pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git
The following commit(s) were added to refs/heads/master by this push: new c7d9b7b QPID-8300: add support for virtualhost option to 1.0 path c7d9b7b is described below commit c7d9b7b825c6a35a7db26774d85248f1311f4539 Author: Gordon Sim <g...@redhat.com> AuthorDate: Wed Apr 24 09:55:23 2019 +0100 QPID-8300: add support for virtualhost option to 1.0 path --- src/qpid/messaging/ConnectionOptions.cpp | 2 ++ src/qpid/messaging/amqp/ConnectionContext.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/qpid/messaging/ConnectionOptions.cpp b/src/qpid/messaging/ConnectionOptions.cpp index 24ea1f8..56ba3bd 100644 --- a/src/qpid/messaging/ConnectionOptions.cpp +++ b/src/qpid/messaging/ConnectionOptions.cpp @@ -136,6 +136,8 @@ void ConnectionOptions::set(const std::string& name, const qpid::types::Variant& redeliveryTimeout = timeValue(value); } else if (name == "properties" || name == "client-properties" || name == "client_properties") { properties = value.asMap(); + } else if (name == "virtualhost") { + virtualhost = value.asString(); } else { throw qpid::messaging::MessagingException(QPID_MSG("Invalid option: " << name << " not recognised")); } diff --git a/src/qpid/messaging/amqp/ConnectionContext.cpp b/src/qpid/messaging/amqp/ConnectionContext.cpp index 5d3a1e3..9894459 100644 --- a/src/qpid/messaging/amqp/ConnectionContext.cpp +++ b/src/qpid/messaging/amqp/ConnectionContext.cpp @@ -1361,6 +1361,9 @@ void ConnectionContext::rollback(boost::shared_ptr<SessionContext> session) { void ConnectionContext::configureConnection() { pn_connection_set_container(connection, identifier.c_str()); + if (virtualhost.size()) { + pn_connection_set_hostname(connection, virtualhost.c_str()); + } setProperties(); if (heartbeat) { // fail an idle connection at 2 x heartbeat (in msecs) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org