diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2016-03-08 19:34:56 -0800 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2016-04-09 20:23:06 -0700 |
commit | ffc8c43962706454ebfa724fc9bccf3a47e9f7d1 (patch) | |
tree | 834b6a7f3d3730b28d550c91c8e9d7506ac89368 | |
parent | bce927888edb524b03c4264a63a0a20f80294f99 (diff) | |
download | rabbitmq-c-ffc8c43962706454ebfa724fc9bccf3a47e9f7d1.tar.gz |
Lib: add amqp_rpc_reply_error convenience function
Add internal function to construct amqp_rpc_reply_t that are library
errors.
-rw-r--r-- | librabbitmq/amqp_private.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/librabbitmq/amqp_private.h b/librabbitmq/amqp_private.h index ab2b5f3..245612b 100644 --- a/librabbitmq/amqp_private.h +++ b/librabbitmq/amqp_private.h @@ -369,6 +369,13 @@ amqp_abort(const char *fmt, ...); int amqp_bytes_equal(amqp_bytes_t r, amqp_bytes_t l); +static inline amqp_rpc_reply_t amqp_rpc_reply_error(amqp_status_enum status) { + amqp_rpc_reply_t reply; + reply.reply_type = AMQP_RESPONSE_LIBRARY_EXCEPTION; + reply.library_error = status; + return reply; +} + int amqp_send_frame_inner(amqp_connection_state_t state, const amqp_frame_t *frame, int flags); #endif |