Repository: qpid-cpp Updated Branches: refs/heads/master 278da4e66 -> 5a8b4a406
QPID-8041: Allow virtualhost field to be specified when forming an AMQP 0-10 connection. Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/5a8b4a40 Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/5a8b4a40 Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/5a8b4a40 Branch: refs/heads/master Commit: 5a8b4a40672740c28a5c90c54adae128df0e271c Parents: 278da4e Author: Keith Wall <kw...@apache.org> Authored: Fri Nov 17 13:09:33 2017 +0000 Committer: Keith Wall <kw...@apache.org> Committed: Fri Nov 17 13:37:35 2017 +0000 ---------------------------------------------------------------------- include/qpid/messaging/Connection.h | 4 ++++ src/qpid/client/amqp0_10/ConnectionImpl.cpp | 2 ++ 2 files changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/5a8b4a40/include/qpid/messaging/Connection.h ---------------------------------------------------------------------- diff --git a/include/qpid/messaging/Connection.h b/include/qpid/messaging/Connection.h index aed3717..fb3aadb 100644 --- a/include/qpid/messaging/Connection.h +++ b/include/qpid/messaging/Connection.h @@ -95,6 +95,10 @@ class QPID_MESSAGING_CLASS_EXTERN Connection : public qpid::messaging::Handle<Co * authentication of the server to the client (and should * be used only as a last resort) * + * When AMQP 0-10 is used, the following options apply: + * + * - virtualhost: The name of the virtual host to work with. + * * When AMQP 1.0 is used, the following options apply: * * - container_id: sets the container id to use for the connection http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/5a8b4a40/src/qpid/client/amqp0_10/ConnectionImpl.cpp ---------------------------------------------------------------------- diff --git a/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/src/qpid/client/amqp0_10/ConnectionImpl.cpp index 12b2dfc..d86a923 100644 --- a/src/qpid/client/amqp0_10/ConnectionImpl.cpp +++ b/src/qpid/client/amqp0_10/ConnectionImpl.cpp @@ -191,6 +191,8 @@ void ConnectionImpl::setOption(const std::string& name, const Variant& value) amqp_0_10::translate(value.asMap(), settings.clientProperties); } else if (name == "disable-auto-decode" || name == "disable_auto_decode") { disableAutoDecode = value; + } else if (name == "virtualhost") { + settings.virtualhost = value.asString(); } else { throw qpid::messaging::MessagingException(QPID_MSG("Invalid option: " << name << " not recognised")); } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org