Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Notice errors rather than sigsegv/sigbus
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyg committed Jun 5, 2010
1 parent edb0bb6 commit 3e5df50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/declare_queue.c
Expand Up @@ -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"));
}
Expand Down
3 changes: 3 additions & 0 deletions tools/delete_queue.c
Expand Up @@ -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);
Expand Down

0 comments on commit 3e5df50

Please sign in to comment.