summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9c44602)
raw | patch | inline | side by side (parent: 9c44602)
author | lzmths <luizmatheus.ac@gmail.com> | |
Wed, 2 Dec 2015 00:40:36 +0000 (21:40 -0300) | ||
committer | lzmths <luizmatheus.ac@gmail.com> | |
Wed, 2 Dec 2015 00:40:36 +0000 (21:40 -0300) |
src/varnish.c | patch | blob | history |
diff --git a/src/varnish.c b/src/varnish.c
index c6c4df05d413b97fe2ee1de80d81b3c42f29e2e1..36908ff17696fe2839d3356bee04b29193e84a1d 100644 (file)
--- a/src/varnish.c
+++ b/src/varnish.c
* Florian octo Forster <octo at collectd.org>
**/
+#include <stdbool.h>
#include "collectd.h"
#include "common.h"
#include "plugin.h"
{
struct VSM_data *vd;
const c_varnish_stats_t *stats;
+ bool test;
user_config_t *conf;
}
#if HAVE_VARNISH_V3
- if (VSC_Open (vd, /* diag = */ 1))
+ test = VSC_Open (vd, /* diag = */ 1);
#else /* if HAVE_VARNISH_V4 */
- if (VSM_Open (vd))
+ test = VSM_Open (vd);
#endif
+ if (test)
{
VSM_Delete (vd);
ERROR ("varnish plugin: Unable to open connection.");