From 09e50608a0db021570db41194abc56b49fb2562d Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 9 Jan 2007 16:55:27 +0000 Subject: Automated C++ client_test and topictest. Andrew Stitcher: patch to change hardcoded 8-0 version numbers to 0-9. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@494483 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/tests/topic_publisher.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cpp/tests/topic_publisher.cpp') diff --git a/cpp/tests/topic_publisher.cpp b/cpp/tests/topic_publisher.cpp index 6d17b7034f..5761acc4aa 100644 --- a/cpp/tests/topic_publisher.cpp +++ b/cpp/tests/topic_publisher.cpp @@ -110,12 +110,12 @@ public: inline bool getHelp() const { return help; } }; -int main(int argc, char** argv){ +int main(int argc, char** argv) { Args args; args.parse(argc, argv); if(args.getHelp()){ args.usage(); - }else{ + } else { try{ Connection connection(args.getTrace()); connection.open(args.getHost(), args.getPort()); @@ -156,10 +156,12 @@ int main(int argc, char** argv){ } channel.close(); connection.close(); - }catch(qpid::QpidError error){ + return 0; + }catch(qpid::QpidError error) { std::cout << error.what() << std::endl; } } + return 1; } Publisher::Publisher(Channel* _channel, const std::string& _controlTopic, bool tx) : -- cgit v1.2.1