Repository: qpid-proton
Updated Branches:
  refs/heads/aconway-c-reactor [created] 51d291b88


NO-JIRA: cpp example broker, set source address


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/a80dd377
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/a80dd377
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/a80dd377

Branch: refs/heads/aconway-c-reactor
Commit: a80dd377f270ac2f1b1899a7b0c4252728619781
Parents: efd033c
Author: Alan Conway <[email protected]>
Authored: Sat Nov 12 00:51:46 2016 -0500
Committer: Alan Conway <[email protected]>
Committed: Sat Nov 12 01:15:23 2016 -0500

----------------------------------------------------------------------
 examples/cpp/mt/broker.cpp | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/a80dd377/examples/cpp/mt/broker.cpp
----------------------------------------------------------------------
diff --git a/examples/cpp/mt/broker.cpp b/examples/cpp/mt/broker.cpp
index 39d7132..7ef90c3 100644
--- a/examples/cpp/mt/broker.cpp
+++ b/examples/cpp/mt/broker.cpp
@@ -26,6 +26,8 @@
 #include <proton/error_condition.hpp>
 #include <proton/listen_handler.hpp>
 #include <proton/messaging_handler.hpp>
+#include <proton/sender_options.hpp>
+#include <proton/source_options.hpp>
 #include <proton/thread_safe.hpp>
 
 #include <atomic>
@@ -151,6 +153,7 @@ class broker_connection_handler : public 
proton::messaging_handler {
     void on_sender_open(proton::sender &sender) OVERRIDE {
         queue *q = sender.source().dynamic() ?
             queues_.dynamic() : queues_.get(sender.source().address());
+        
sender.open(proton::sender_options().source((proton::source_options().address(q->name()))));
         std::cout << "sending from " << q->name() << std::endl;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to