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 --- tools/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/common.c b/tools/common.c index b556988..a624105 100644 --- a/tools/common.c +++ b/tools/common.c @@ -91,7 +91,7 @@ void die_amqp_error(int err, const char *fmt, ...) va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); - fprintf(stderr, ": %s\n", amqp_error_string(err)); + fprintf(stderr, ": %s\n", amqp_error_string2(err)); exit(1); } @@ -140,7 +140,7 @@ const char *amqp_rpc_reply_string(amqp_rpc_reply_t r) return "missing RPC reply type"; case AMQP_RESPONSE_LIBRARY_EXCEPTION: - return amqp_error_string(r.library_error); + return amqp_error_string2(r.library_error); case AMQP_RESPONSE_SERVER_EXCEPTION: return amqp_server_exception_string(r); -- cgit v1.2.1