diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-14 11:17:18 -0700 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2013-06-14 11:17:18 -0700 |
commit | 996a47470aa972410a15989ca8ecb3901056396f (patch) | |
tree | 7ebc24ce34bf2fcc80cacaa4aa50a390b75d4ef5 /examples | |
parent | 4d9f3abcc30bc628dd872d83233de8744136547d (diff) | |
download | rabbitmq-c-996a47470aa972410a15989ca8ecb3901056396f.tar.gz |
Preserve API/ABI of amqp_error_string()
Preserve API/ABI of amqp_error_string() by having it return a string
allocated on the heap. Deprecate this function in favor of
amqp_error_string2() which returns a statically allocated string
Diffstat (limited to 'examples')
-rw-r--r-- | examples/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/utils.c b/examples/utils.c index 5d4a1f9..ef04968 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -59,7 +59,7 @@ void die(const char *fmt, ...) void die_on_error(int x, char const *context) { if (x < 0) { - fprintf(stderr, "%s: %s\n", context, amqp_error_string(x)); + fprintf(stderr, "%s: %s\n", context, amqp_error_string2(x)); exit(1); } } @@ -75,7 +75,7 @@ void die_on_amqp_error(amqp_rpc_reply_t x, char const *context) break; case AMQP_RESPONSE_LIBRARY_EXCEPTION: - fprintf(stderr, "%s: %s\n", context, amqp_error_string(x.library_error)); + fprintf(stderr, "%s: %s\n", context, amqp_error_string2(x.library_error)); break; case AMQP_RESPONSE_SERVER_EXCEPTION: |