[master] b230de2 Limit the grouping method

Martin Blix Grydeland martin at varnish-software.com
Tue Feb 25 15:58:39 CET 2014


commit b230de211b544485ce987b091106c29439e14901
Author: Guillaume Quintard <guillaume.quintard at gmail.com>
Date:   Thu Feb 6 18:19:12 2014 +0100

    Limit the grouping method

diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index 92aa3f4..ec30da5 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -381,6 +381,12 @@ main(int argc, char **argv)
 				usage(1);
 		}
 	}
+	/* Check for valid grouping mode */
+	assert(VUT.g_arg < VSL_g__MAX);
+	if (VUT.g_arg != VSL_g_vxid && VUT.g_arg != VSL_g_request)
+		VUT_Error(1, "Invalid grouping mode: %s (only vxid and request are supported)",
+				VSLQ_grouping[VUT.g_arg]);
+
 	if (profile) {
 		for (active_profile = profiles; active_profile->name;
 			active_profile++) {



More information about the varnish-commit mailing list