summaryrefslogtreecommitdiff
path: root/cpp/tests/topic_publisher.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-01-09 16:55:27 +0000
committerAlan Conway <aconway@apache.org>2007-01-09 16:55:27 +0000
commit09e50608a0db021570db41194abc56b49fb2562d (patch)
tree4f955d4a19c1758275732ec8a3032a83f94bd2fa /cpp/tests/topic_publisher.cpp
parentfd88a6ddb9bc813286089558a22732f03410b79c (diff)
downloadqpid-python-09e50608a0db021570db41194abc56b49fb2562d.tar.gz
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
Diffstat (limited to 'cpp/tests/topic_publisher.cpp')
-rw-r--r--cpp/tests/topic_publisher.cpp8
1 files changed, 5 insertions, 3 deletions
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) :