summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'librabbitmq/amqp_api.c')
-rw-r--r--librabbitmq/amqp_api.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index b2793ff..25b855f 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -52,6 +52,7 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <stdarg.h>
#include "amqp.h"
#include "amqp_framing.h"
@@ -93,6 +94,18 @@ char *amqp_error_string(int err)
return strdup(str);
}
+void amqp_abort(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+ fputc('\n', stderr);
+ abort();
+}
+
+
+
#define RPC_REPLY(replytype) \
(state->most_recent_api_result.reply_type == AMQP_RESPONSE_NORMAL \
? (replytype *) state->most_recent_api_result.reply.decoded \