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_url.c | |
parent | 7bb64e49db0a183da67fab880803dbe4517e8560 (diff) | |
download | rabbitmq-c-github-ask-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_url.c')
-rw-r--r-- | librabbitmq/amqp_url.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/librabbitmq/amqp_url.c b/librabbitmq/amqp_url.c index b200adc..602b554 100644 --- a/librabbitmq/amqp_url.c +++ b/librabbitmq/amqp_url.c @@ -110,7 +110,7 @@ static char find_delim(char **pp, int colon_and_at_sign_are_delims) /* Parse an AMQP URL into its component parts. */ int amqp_parse_url(char *url, struct amqp_connection_info *parsed) { - int res = -ERROR_BAD_AMQP_URL; + int res = AMQP_STATUS_BAD_URL; char delim; char *start; char *host; @@ -205,13 +205,13 @@ int amqp_parse_url(char *url, struct amqp_connection_info *parsed) } parsed->vhost = start; - res = 0; + res = AMQP_STATUS_OK; } else if (delim == 0) { - res = 0; + res = AMQP_STATUS_OK; } /* Any other delimiter is bad, and we will return - ERROR_BAD_AMQP_URL. */ + AMQP_STATUS_BAD_AMQP_URL. */ out: return res; |