summaryrefslogtreecommitdiff
path: root/examples/amqp_unbind.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_unbind.c')
-rw-r--r--examples/amqp_unbind.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/amqp_unbind.c b/examples/amqp_unbind.c
index 6a746b8..aea0738 100644
--- a/examples/amqp_unbind.c
+++ b/examples/amqp_unbind.c
@@ -34,8 +34,8 @@
*/
#include <stdint.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <amqp.h>
@@ -43,8 +43,7 @@
#include "utils.h"
-int main(int argc, char const *const *argv)
-{
+int main(int argc, char const *const *argv) {
char const *hostname;
int port, status;
char const *exchange;
@@ -76,20 +75,21 @@ int main(int argc, char const *const *argv)
die("opening TCP socket");
}
- die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN, "guest", "guest"),
+ die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN,
+ "guest", "guest"),
"Logging in");
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
- amqp_queue_unbind(conn, 1,
- amqp_cstring_bytes(queue),
+ amqp_queue_unbind(conn, 1, amqp_cstring_bytes(queue),
amqp_cstring_bytes(exchange),
- amqp_cstring_bytes(bindingkey),
- amqp_empty_table);
+ amqp_cstring_bytes(bindingkey), amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Unbinding");
- die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel");
- die_on_amqp_error(amqp_connection_close(conn, AMQP_REPLY_SUCCESS), "Closing connection");
+ die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS),
+ "Closing channel");
+ die_on_amqp_error(amqp_connection_close(conn, AMQP_REPLY_SUCCESS),
+ "Closing connection");
die_on_error(amqp_destroy_connection(conn), "Ending connection");
return 0;
}