From 8d2726baaa71d65bc70e76adeb2aa33bcd4f1421 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Tue, 21 Jan 2014 10:24:53 +0100 Subject: [PATCH] amqp: fix symbol lookup error with librabbitmq >= 0.4.0 amqp_socket_close() which we were using isn't exported anymore. See https://github.com/alanxz/rabbitmq-c/commit/bdda7ab amqp_destroy_connection() implicitly closes the socket, so we don't need to bother about this if using librabbitmq >= 0.4.0 credits to @tokkee for figuring that out ! --- src/amqp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/amqp.c b/src/amqp.c index 7de9d7f2..e5a2d79e 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -422,7 +422,7 @@ static int camqp_connect (camqp_config_t *conf) /* {{{ */ } #ifdef HAVE_AMQP_TCP_SOCKET -# define CLOSE_SOCKET() amqp_socket_close (socket) +# define CLOSE_SOCKET() // amqp_destroy_connection() closes the socket for us /* TODO: add support for SSL using amqp_ssl_socket_new * and related functions */ socket = amqp_tcp_socket_new (conf->connection); @@ -441,7 +441,6 @@ static int camqp_connect (camqp_config_t *conf) /* {{{ */ status *= -1; ERROR ("amqp plugin: amqp_socket_open failed: %s", sstrerror (status, errbuf, sizeof (errbuf))); - CLOSE_SOCKET (); amqp_destroy_connection (conf->connection); conf->connection = NULL; return (status); -- 2.11.0