diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-05-25 23:44:24 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-13 15:38:11 -0700 |
commit | 3066080279e649390362a9d2390ea22e9c588fad (patch) | |
tree | 493d38a111cf2937f7fe2dfc3948301e1f103146 /librabbitmq/amqp_tcp_socket.c | |
parent | 7bb64e49db0a183da67fab880803dbe4517e8560 (diff) | |
download | rabbitmq-c-3066080279e649390362a9d2390ea22e9c588fad.tar.gz |
Expose public error-code interface
Publicly define the error codes returned from the various public API
functions. The error codes are defined in the amqp_status_enum and are
all negative in value to work with functions that return positive
values.
OS and SSL specific codes are no longer munged into the error code, as
it is unlikely for that information to be useful to library users.
Diffstat (limited to 'librabbitmq/amqp_tcp_socket.c')
-rw-r--r-- | librabbitmq/amqp_tcp_socket.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/librabbitmq/amqp_tcp_socket.c b/librabbitmq/amqp_tcp_socket.c index 2eb366f..1a155bb 100644 --- a/librabbitmq/amqp_tcp_socket.c +++ b/librabbitmq/amqp_tcp_socket.c @@ -76,7 +76,12 @@ amqp_tcp_socket_close(void *base) status = amqp_os_socket_close(self->sockfd); free(self); } - return status; + + if (0 == status) { + return AMQP_STATUS_OK; + } else { + return AMQP_STATUS_SOCKET_ERROR; + } } static int |