varnish plugin: fix build against pre varnish 5.2
authorMarc Fournier <marc.fournier@camptocamp.com>
Wed, 8 Nov 2017 20:55:04 +0000 (21:55 +0100)
committerMarc Fournier <marc.fournier@camptocamp.com>
Wed, 8 Nov 2017 21:15:38 +0000 (22:15 +0100)
Older Varnish versions don't know about VSM_Destroy()

src/varnish.c

index 67c5bfd..69daa98 100644 (file)
@@ -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;
   }