X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fvarnish.c;h=ebc8e7aa00fe5051729164f26ebbd4048db921d4;hb=68123637814ea09efff5bf56f3209eefbe41287a;hp=67c5bfd126d0f7fdc9d657ccb23c727d7819fe6a;hpb=3ab73ae8b23b9816fb69fde630c5ad667aa1e09f;p=collectd.git diff --git a/src/varnish.c b/src/varnish.c index 67c5bfd1..ebc8e7aa 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -144,7 +144,6 @@ static int varnish_monitor(void *priv, { uint64_t val; const user_config_t *conf; - const char *class; const char *name; if (pt == NULL) @@ -160,9 +159,9 @@ static int varnish_monitor(void *priv, strcpy(namebuff, c + 1); name = namebuff; - (void)class; - #elif HAVE_VARNISH_V4 + const char *class; + class = pt->section->fantom->type; name = pt->desc->name; @@ -170,6 +169,8 @@ static int varnish_monitor(void *priv, return 0; #elif HAVE_VARNISH_V3 + const char *class; + class = pt->class; name = pt->name; @@ -1390,7 +1391,7 @@ static int varnish_read(user_data_t *ud) /* {{{ */ #endif #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 if (!ok) { - VSM_Destroy(&vd); + VSM_Delete(vd); ERROR("varnish plugin: Unable to open connection."); return -1; } @@ -1403,7 +1404,7 @@ static int varnish_read(user_data_t *ud) /* {{{ */ #endif #if HAVE_VARNISH_V3 || HAVE_VARNISH_V4 if (!stats) { - VSM_Destroy(&vd); + VSM_Delete(vd); ERROR("varnish plugin: Unable to get statistics."); return -1; }