diff options
author | David Wragg <david@rabbitmq.com> | 2010-07-27 18:32:21 +0100 |
---|---|---|
committer | David Wragg <david@rabbitmq.com> | 2010-07-27 18:32:21 +0100 |
commit | a39a656ffb1a72b031aa586a37ff77b39939b6fb (patch) | |
tree | d237a76d982695618a537944655de9f07e08f378 /examples | |
parent | 7032fcd3e646d5e25cd8c40144a03ab869a9f5ff (diff) | |
download | rabbitmq-c-a39a656ffb1a72b031aa586a37ff77b39939b6fb.tar.gz |
die_on_error expects a librabbitmq error code
Diffstat (limited to 'examples')
-rw-r--r-- | examples/amqp_consumer.c | 3 | ||||
-rw-r--r-- | examples/amqp_listen.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/amqp_consumer.c b/examples/amqp_consumer.c index 6b24d8c..1557fb1 100644 --- a/examples/amqp_consumer.c +++ b/examples/amqp_consumer.c @@ -169,7 +169,8 @@ int main(int argc, char const * const *argv) { die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring queue"); queuename = amqp_bytes_malloc_dup(r->queue); if (queuename.bytes == NULL) { - die_on_error(-ENOMEM, "Copying queue name"); + fprintf(stderr, "Out of memory while copying queue name"); + return 1; } } diff --git a/examples/amqp_listen.c b/examples/amqp_listen.c index 6025e5c..ba7d80a 100644 --- a/examples/amqp_listen.c +++ b/examples/amqp_listen.c @@ -101,7 +101,8 @@ int main(int argc, char const * const *argv) { die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring queue"); queuename = amqp_bytes_malloc_dup(r->queue); if (queuename.bytes == NULL) { - die_on_error(-ENOMEM, "Copying queue name"); + fprintf(stderr, "Out of memory while copying queue name"); + return 1; } } |