[master] 66d1732 Add VSM_Unmap()

Poul-Henning Kamp phk at FreeBSD.org
Fri Jun 16 23:11:05 CEST 2017


commit 66d1732100b069cb84f138d98b341189fbc215cd
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Jun 16 20:23:17 2017 +0000

    Add VSM_Unmap()

diff --git a/include/vapi/vsm.h b/include/vapi/vsm.h
index 3345371..4055b0a 100644
--- a/include/vapi/vsm.h
+++ b/include/vapi/vsm.h
@@ -154,6 +154,7 @@ int VSM__itern(const struct vsm *vd, struct VSM_fantom *vf);
 	 */
 
 int VSM_Map(struct vsm *vd, struct VSM_fantom *vf);
+int VSM_Unmap(struct vsm *vd, struct VSM_fantom *vf);
 
 struct vsm_valid {
 	const char *name;
diff --git a/lib/libvarnishapi/libvarnishapi.map b/lib/libvarnishapi/libvarnishapi.map
index 097be21..3a3fbe0 100644
--- a/lib/libvarnishapi/libvarnishapi.map
+++ b/lib/libvarnishapi/libvarnishapi.map
@@ -183,6 +183,7 @@ LIBVARNISHAPI_1.7 {
 	VSM_valid;
 	VSM_similar;
 	VSM_Map;
+	VSM_Unmap;
 	VSC_Destroy_Point;
 	VSC_Clone_Point;
 } LIBVARNISHAPI_1.0;
diff --git a/lib/libvarnishapi/vsc.c b/lib/libvarnishapi/vsc.c
index a6935e4..59f034b 100644
--- a/lib/libvarnishapi/vsc.c
+++ b/lib/libvarnishapi/vsc.c
@@ -360,7 +360,7 @@ VSC_Iter(struct vsm *vd, struct VSM_fantom *fantom, VSC_iter_f *func,
 		if (fantom != NULL)
 			*fantom = ifantom;
 		i = vsc_iter_fantom(vd, &ifantom, vsb, func, priv);
-		// AZ(VSM_Unmap(vd, &ifantom));
+		AZ(VSM_Unmap(vd, &ifantom));
 		if (i)
 			break;
 	}
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index c4a7bd9..8efba40 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -459,6 +459,18 @@ VSM_Map(struct vsm *vd, struct VSM_fantom *vf)
 
 /*--------------------------------------------------------------------*/
 
+int
+VSM_Unmap(struct vsm *vd, struct VSM_fantom *vf)
+{
+
+	CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
+	AN(vf);
+	AN(vf->b);
+	return (0);
+}
+
+/*--------------------------------------------------------------------*/
+
 const struct vsm_valid *
 VSM_StillValid(const struct vsm *vd, struct VSM_fantom *vf)
 {



More information about the varnish-commit mailing list