You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2018/11/02 20:46:28 UTC

[08/50] qpid-proton git commit: PROTON-1798: [cpp] C++ broker example, remove unused shutdown code.

PROTON-1798: [cpp] C++ broker example, remove unused shutdown code.


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

Branch: refs/heads/go1
Commit: e5aac0083bb1cc2a6e96a361ff6031066e4dc449
Parents: c6db635
Author: Alan Conway <ac...@redhat.com>
Authored: Wed Sep 5 13:56:46 2018 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Fri Sep 7 11:26:25 2018 -0400

----------------------------------------------------------------------
 c/examples/example_test.py |  4 ++--
 cpp/examples/broker.cpp    | 14 ++------------
 2 files changed, 4 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e5aac008/c/examples/example_test.py
----------------------------------------------------------------------
diff --git a/c/examples/example_test.py b/c/examples/example_test.py
index 5d6322f..1834989 100644
--- a/c/examples/example_test.py
+++ b/c/examples/example_test.py
@@ -117,8 +117,8 @@ class ExampleTest(unittest.TestCase):
                 self.assertIn("secure connection:", got)
                 self.assertIn(send_expect(), got)
                 self.assertMultiLineEqual(receive_expect(), self.runex("receive", b.port))
-        except subprocess.CalledProcessError as e:
-            if e.output.startswith(b"error initializing SSL"):
+        except TestProcessError as e:
+            if e.output and e.output.startswith(b"error initializing SSL"):
                 print("Skipping %s: SSL not available" % self.id())
             else:
                 raise

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e5aac008/cpp/examples/broker.cpp
----------------------------------------------------------------------
diff --git a/cpp/examples/broker.cpp b/cpp/examples/broker.cpp
index 479ec01..d45309e 100644
--- a/cpp/examples/broker.cpp
+++ b/cpp/examples/broker.cpp
@@ -337,18 +337,8 @@ public:
     // A receiver receives messages from a publisher to a queue.
     void on_receiver_open(proton::receiver &receiver) OVERRIDE {
         std::string qname = receiver.target().address();
-        if (qname == "shutdown") {
-            std::cout << "broker shutting down" << std::endl;
-            // Sending to the special "shutdown" queue stops the broker.
-            receiver.connection().container().stop(
-                proton::error_condition("shutdown", "stop broker"));
-        } else {
-            if (qname.empty()) {
-                DOUT(std::cerr << "ODD - trying to attach to a empty address\n";);
-            }
-            Receiver* r = new Receiver(receiver);
-            queue_manager_.add(make_work(&QueueManager::findQueueReceiver, &queue_manager_, r, qname));
-        }
+        Receiver* r = new Receiver(receiver);
+        queue_manager_.add(make_work(&QueueManager::findQueueReceiver, &queue_manager_, r, qname));
     }
 
     void on_session_close(proton::session &session) OVERRIDE {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org