summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp.h
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-06-02 23:36:14 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-06-13 15:39:00 -0700
commitba9d1f52ef4770bd9590fd7c197e5a69967f04c4 (patch)
treea680c5cc4b56a6443215c285f094ebb56100d791 /librabbitmq/amqp.h
parent3066080279e649390362a9d2390ea22e9c588fad (diff)
downloadrabbitmq-c-github-ask-ba9d1f52ef4770bd9590fd7c197e5a69967f04c4.tar.gz
Report out of buf space error in amqp_table_encode
amqp_encode_8 and amqp_encode_bytes return 1 on success, 0 otherwise. Correct the checking of the return value of these functions to match the style used in amqp_table.c Report AMQP_STATUS_INVALID_PARAMETER in the event an invalid field kind is input (instead of abort()). Report AMQP_STATUS_TABLE_TOO_BIG if the table is too large to be encoded in the buffer provided.
Diffstat (limited to 'librabbitmq/amqp.h')
-rw-r--r--librabbitmq/amqp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index f469dda..59513c1 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -341,6 +341,8 @@ typedef enum amqp_status_enum_
AMQP_STATUS_CONNECTION_CLOSED = -0x0007,
AMQP_STATUS_BAD_URL = -0x0008,
AMQP_STATUS_SOCKET_ERROR = -0x0009,
+ AMQP_STATUS_INVALID_PARAMETER = -0x000A,
+ AMQP_STATUS_TABLE_TOO_BIG = -0x000B,
AMQP_STATUS_SSL_ERROR = -0x0200
} amqp_status_enum;