From 095fb80c67258ab00a2654bdd4a094f4d37ed4b8 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Thu, 3 Jun 2010 20:23:30 +0000 Subject: QPID-2644 - Console examples sometimes fail due to not waiting for the broker connection to complete Moved 'Broker::waitForStable' from private to public, used this function in the examples to hold off until the broker is fully connected. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@951141 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/examples/qmf-console/console.cpp | 1 + qpid/cpp/examples/qmf-console/ping.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'qpid/cpp/examples') diff --git a/qpid/cpp/examples/qmf-console/console.cpp b/qpid/cpp/examples/qmf-console/console.cpp index 5700d5556f..b5375b673f 100644 --- a/qpid/cpp/examples/qmf-console/console.cpp +++ b/qpid/cpp/examples/qmf-console/console.cpp @@ -81,6 +81,7 @@ int main_int(int /*argc*/, char** /*argv*/) Broker* broker; broker = sm.addBroker(settings); + broker->waitForStable(); cout << "Package List:" << endl; vector packages; diff --git a/qpid/cpp/examples/qmf-console/ping.cpp b/qpid/cpp/examples/qmf-console/ping.cpp index 405c15f1c4..fe537d48d2 100644 --- a/qpid/cpp/examples/qmf-console/ping.cpp +++ b/qpid/cpp/examples/qmf-console/ping.cpp @@ -55,6 +55,7 @@ int main_int(int /*argc*/, char** /*argv*/) // Add a broker connection to the session manager. // Broker* broker = sm.addBroker(connSettings); + broker->waitForStable(); uint32_t count = 5; // The number of echo requests we will send to the broker. Object::Vector list; // A container for holding objects retrieved from the broker. -- cgit v1.2.1