summaryrefslogtreecommitdiff
path: root/examples/amqp_sendstring.c
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-04-08 14:52:53 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-04-08 14:52:53 -0700
commitad2b116059e22d393b7e44ad54f345a3fb4e267b (patch)
treecfd98876757f85d9fe7bfe56d179bd5fb63a8ff0 /examples/amqp_sendstring.c
parentf3074030723b840690458983b63c746549aa3bd5 (diff)
downloadrabbitmq-c-github-ask-ad2b116059e22d393b7e44ad54f345a3fb4e267b.tar.gz
Formatted source code with astyle utilty
Diffstat (limited to 'examples/amqp_sendstring.c')
-rw-r--r--examples/amqp_sendstring.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/examples/amqp_sendstring.c b/examples/amqp_sendstring.c
index e108ea7..f1456c9 100644
--- a/examples/amqp_sendstring.c
+++ b/examples/amqp_sendstring.c
@@ -41,7 +41,8 @@
#include "utils.h"
-int main(int argc, char const * const *argv) {
+int main(int argc, char const *const *argv)
+{
char const *hostname;
int port;
char const *exchange;
@@ -67,7 +68,7 @@ int main(int argc, char const * const *argv) {
die_on_error(sockfd = amqp_open_socket(hostname, port), "Opening socket");
amqp_set_sockfd(conn, sockfd);
die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN, "guest", "guest"),
- "Logging in");
+ "Logging in");
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
@@ -77,14 +78,14 @@ int main(int argc, char const * const *argv) {
props.content_type = amqp_cstring_bytes("text/plain");
props.delivery_mode = 2; /* persistent delivery mode */
die_on_error(amqp_basic_publish(conn,
- 1,
- amqp_cstring_bytes(exchange),
- amqp_cstring_bytes(routingkey),
- 0,
- 0,
- &props,
- amqp_cstring_bytes(messagebody)),
- "Publishing");
+ 1,
+ amqp_cstring_bytes(exchange),
+ amqp_cstring_bytes(routingkey),
+ 0,
+ 0,
+ &props,
+ amqp_cstring_bytes(messagebody)),
+ "Publishing");
}
die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel");