[master] f895383 Restore shm_reclen as an alias for vsl_reclen

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Tue Apr 11 15:32:06 CEST 2017


commit f895383ded3f24f2a42e7224567d31ec9a2af535
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Apr 11 15:24:57 2017 +0200

    Restore shm_reclen as an alias for vsl_reclen
    
    Fixes #2307

diff --git a/bin/varnishd/mgt/mgt_param_tbl.c b/bin/varnishd/mgt/mgt_param_tbl.c
index e29788d..431e937 100644
--- a/bin/varnishd/mgt/mgt_param_tbl.c
+++ b/bin/varnishd/mgt/mgt_param_tbl.c
@@ -144,6 +144,12 @@ struct parspec mgt_parspec[] = {
 		MEMPOOL_TEXT,
 		0,
 		"10,100,10", ""},
+	{ "shm_reclen", tweak_vsl_reclen, &mgt_param.vsl_reclen,
+		"16b", NULL,
+		"Old name for vsl_reclen, use that instead.",
+		0,
+		"255b",
+		"bytes" },
 
 	{ NULL, NULL, NULL }
 };
diff --git a/bin/varnishtest/tests/r02307.vtc b/bin/varnishtest/tests/r02307.vtc
new file mode 100644
index 0000000..a86fe6d
--- /dev/null
+++ b/bin/varnishtest/tests/r02307.vtc
@@ -0,0 +1,4 @@
+varnishtest "shm_reclen alias for vsl_reclen"
+
+varnish v1 -cli "param.set shm_reclen 42"
+varnish v1 -cliexpect 42b "param.show vsl_reclen"
diff --git a/include/tbl/params.h b/include/tbl/params.h
index a44b625..5658f4b 100644
--- a/include/tbl/params.h
+++ b/include/tbl/params.h
@@ -969,6 +969,8 @@ PARAM(
 	/* func */	NULL
 )
 
+#if 0
+/* actual location mgt_param_tbl.c */
 PARAM(
 	/* name */	shm_reclen,
 	/* typ */	vsl_reclen,
@@ -982,6 +984,7 @@ PARAM(
 	/* l-text */	"",
 	/* func */	NULL
 )
+#endif
 
 PARAM(
 	/* name */	shortlived,



More information about the varnish-commit mailing list