From: Marc Fournier Date: Wed, 8 Nov 2017 20:55:04 +0000 (+0100) Subject: varnish plugin: fix build against pre varnish 5.2 X-Git-Tag: collectd-5.8.0~14^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=7978b43670472a000831f7ff37a6a30771a6ee6f;p=collectd.git varnish plugin: fix build against pre varnish 5.2 Older Varnish versions don't know about VSM_Destroy() --- diff --git a/src/varnish.c b/src/varnish.c index 67c5bfd1..69daa980 100644 --- a/src/varnish.c +++ b/src/varnish.c @@ -1390,7 +1390,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 +1403,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; }