From: Florian Forster Date: Fri, 24 Nov 2023 13:25:01 +0000 (+0100) Subject: ./contrib/format.sh src/amqp.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=692b368b7786bc2a6277adeeacd2cc979a470ebb;p=thirdparty%2Fcollectd.git ./contrib/format.sh src/amqp.c --- diff --git a/src/amqp.c b/src/amqp.c index 30fead60e..97724ccfe 100644 --- a/src/amqp.c +++ b/src/amqp.c @@ -36,27 +36,27 @@ #include "utils_random.h" #if HAVE_RABBITMQ_C_AMQP_H -# include -# if HAVE_RABBITMQ_C_FRAMING_H -# include -# endif -# if HAVE_RABBITMQ_C_TCP_SOCKET_H -# include -# endif -# if HAVE_RABBITMQ_C_SSL_SOCKET_H -# include -# endif +#include +#if HAVE_RABBITMQ_C_FRAMING_H +#include +#endif +#if HAVE_RABBITMQ_C_TCP_SOCKET_H +#include +#endif +#if HAVE_RABBITMQ_C_SSL_SOCKET_H +#include +#endif #elif HAVE_AMQP_H -# include -# if HAVE_AMQP_FRAMING_H -# include -# endif -# if HAVE_AMQP_TCP_SOCKET_H -# include -# endif -# if HAVE_AMQP_SSL_SOCKET_H -# include -# endif +#include +#if HAVE_AMQP_FRAMING_H +#include +#endif +#if HAVE_AMQP_TCP_SOCKET_H +#include +#endif +#if HAVE_AMQP_SSL_SOCKET_H +#include +#endif #endif /* Defines for the delivery mode. I have no idea why they're not defined by the @@ -467,7 +467,7 @@ static int camqp_connect(camqp_config_t *conf) /* {{{ */ } if (conf->tls_client_cert && conf->tls_client_key) { int status = amqp_ssl_socket_set_key(socket, conf->tls_client_cert, - conf->tls_client_key); + conf->tls_client_key); if (status < 0) { ERROR("amqp plugin: amqp_ssl_socket_set_key failed: %s", amqp_error_string2(status)); @@ -495,12 +495,13 @@ static int camqp_connect(camqp_config_t *conf) /* {{{ */ return status; } - amqp_rpc_reply_t reply = amqp_login(conf->connection, CONF(conf, vhost), - /* channel max = */ 0, - /* frame max = */ 131072, - /* heartbeat = */ 0, - /* authentication = */ AMQP_SASL_METHOD_PLAIN, - CONF(conf, user), CONF(conf, password)); + amqp_rpc_reply_t reply = + amqp_login(conf->connection, CONF(conf, vhost), + /* channel max = */ 0, + /* frame max = */ 131072, + /* heartbeat = */ 0, + /* authentication = */ AMQP_SASL_METHOD_PLAIN, + CONF(conf, user), CONF(conf, password)); if (reply.reply_type != AMQP_RESPONSE_NORMAL) { ERROR("amqp plugin: amqp_login (vhost = %s, user = %s) failed.", CONF(conf, vhost), CONF(conf, user));