collectd/collectd — Issue #6: AMQP plugin build error
Author: octo
Created: 2012-02-19 11:57:41+00:00
State: open

From: Xavier (Mantis #51)

The *amqp plugin* does not compile properly with last version of *librabbitmq* on Ubuntu 11.10.

Patch that fix the issue:

diff --git a/src/amqp.c b/src/amqp.c
index adf4792..6e69b38 100644
--- a/src/amqp.c
+++ b/src/amqp.c
@@ -178,8 +178,8 @@ static char *camqp_strerror (camqp_config_t *conf, /* {{{ */
break;

case AMQP_RESPONSE_LIBRARY_EXCEPTION:
- if (r.library_errno)
- return (sstrerror (r.library_errno, buffer, buffer_size));
+ if (r.library_error)
+ return (sstrerror (r.library_error, buffer, buffer_size));
else
sstrncpy (buffer, "End of stream", sizeof (buffer));
break;
@@ -316,7 +368,8 @@ static int camqp_setup_queue (camqp_config_t *conf) /* {{{ */
/* consumer_tag = */ AMQP_EMPTY_BYTES,
/* no_local = */ 0,
/* no_ack = */ 1,
- /* exclusive = */ 0);
+ /* exclusive = */ 0,
+ /* arguments = */ AMQP_EMPTY_TABLE);
if ((cm_ret == NULL) && camqp_is_error (conf))
{
char errbuf[1024];