summaryrefslogtreecommitdiff
path: root/examples/amqp_listen.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_listen.c')
-rw-r--r--examples/amqp_listen.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/examples/amqp_listen.c b/examples/amqp_listen.c
index f208652..86c4555 100644
--- a/examples/amqp_listen.c
+++ b/examples/amqp_listen.c
@@ -56,13 +56,9 @@
#include <amqp.h>
#include <amqp_framing.h>
-#include <unistd.h>
#include <assert.h>
-#include "example_utils.h"
-
-/* Private: compiled out in NDEBUG mode */
-extern void amqp_dump(void const *buffer, size_t len);
+#include "utils.h"
int main(int argc, char const * const *argv) {
char const *hostname;
@@ -95,8 +91,8 @@ int main(int argc, char const * const *argv) {
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
{
- amqp_queue_declare_ok_t *r = amqp_queue_declare(conn, 1, AMQP_EMPTY_BYTES, 0, 0, 0, 1,
- AMQP_EMPTY_TABLE);
+ amqp_queue_declare_ok_t *r = amqp_queue_declare(conn, 1, amqp_empty_bytes, 0, 0, 0, 1,
+ amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring queue");
queuename = amqp_bytes_malloc_dup(r->queue);
if (queuename.bytes == NULL) {
@@ -106,10 +102,10 @@ int main(int argc, char const * const *argv) {
}
amqp_queue_bind(conn, 1, queuename, amqp_cstring_bytes(exchange), amqp_cstring_bytes(bindingkey),
- AMQP_EMPTY_TABLE);
+ amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding queue");
- amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0, AMQP_EMPTY_TABLE);
+ amqp_basic_consume(conn, 1, queuename, amqp_empty_bytes, 0, 1, 0, amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
{