[master] 82ad97a Make sure we ask for at least one frame

Guillaume Quintard guillaume at varnish-software.com
Tue Feb 14 10:56:05 CET 2017


commit 82ad97ab60f873514b06d2296c147f01ac2272dc
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Feb 14 10:17:36 2017 +0100

    Make sure we ask for at least one frame

diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 26af037..a692953 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -2209,9 +2209,12 @@ cmd_rxdata(CMD_ARGS)
 	CAST_OBJ_NOTNULL(s, priv, STREAM_MAGIC);
 
 	while (*++av)
-		if (!strcmp(*av, "-some"))
-			STRTOU32_CHECK(times, av, p, vl, "-some", 0);
-		else if (!strcmp(*av, "-all"))
+		if (!strcmp(*av, "-some")) {
+			STRTOU32(times, *av, p, vl, "-some");
+			if (time <= 0)
+				vtc_fatal(vl, "-some argument must be more"
+					       "than 0 (found \"%s\")\n", *av);
+		} else if (!strcmp(*av, "-all"))
 			loop = 1;
 		else
 			break;



More information about the varnish-commit mailing list