From 996a47470aa972410a15989ca8ecb3901056396f Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Fri, 14 Jun 2013 11:17:18 -0700 Subject: 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 --- examples/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') 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: -- cgit v1.2.1