diff options
author | Tony Garnock-Jones <tonygarnockjones@gmail.com> | 2010-06-06 11:08:18 +1200 |
---|---|---|
committer | Tony Garnock-Jones <tonygarnockjones@gmail.com> | 2010-06-06 11:08:18 +1200 |
commit | 3e5df50a72ecce3b232a412d5bdc1f33ed3390ce (patch) | |
tree | c9abbd2c69cfe3b48d9c15e864e490a5431f67a7 /tools | |
parent | edb0bb6cc82ecaf5474dcf80b55fc239d83bf1e8 (diff) | |
download | rabbitmq-c-github-ask-3e5df50a72ecce3b232a412d5bdc1f33ed3390ce.tar.gz |
Notice errors rather than sigsegv/sigbus
Diffstat (limited to 'tools')
-rw-r--r-- | tools/declare_queue.c | 3 | ||||
-rw-r--r-- | tools/delete_queue.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/declare_queue.c b/tools/declare_queue.c index 9fb917f..662531f 100644 --- a/tools/declare_queue.c +++ b/tools/declare_queue.c @@ -91,6 +91,9 @@ int main(int argc, const char **argv) 0, 0, AMQP_EMPTY_TABLE); + if (reply == NULL) { + die_rpc(amqp_get_rpc_reply(conn), "queue.declare"); + } write(1, reply->queue.bytes, reply->queue.len); write(1, "\n", strlen("\n")); } diff --git a/tools/delete_queue.c b/tools/delete_queue.c index 4397545..41d0d13 100644 --- a/tools/delete_queue.c +++ b/tools/delete_queue.c @@ -91,6 +91,9 @@ int main(int argc, const char **argv) cstring_bytes(queue), if_unused, if_empty); + if (reply == NULL) { + die_rpc(amqp_get_rpc_reply(conn), "queue.delete"); + } printf("%u\n", reply->message_count); } close_connection(conn); |