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 /tools | |
parent | 4d9f3abcc30bc628dd872d83233de8744136547d (diff) | |
download | rabbitmq-c-github-ask-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 'tools')
-rw-r--r-- | tools/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |