[master] b802da8 Responses limited by ${cli_limit} are OK.

Poul-Henning Kamp phk at FreeBSD.org
Thu Nov 9 18:41:07 UTC 2017


commit b802da87dbd14038c620cf8f1fa742dce9026a96
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Nov 9 09:43:21 2017 +0000

    Responses limited by ${cli_limit} are OK.

diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index aa3bf6d..6d76761 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -132,7 +132,7 @@ cli_sock(const char *T_arg, const char *S_arg)
 		cli_write(sock, "\n");
 		(void)VCLI_ReadResult(sock, &status, &answer, timeout);
 	}
-	if (status != CLIS_OK) {
+	if (status != CLIS_OK && status != CLIS_TRUNCATED) {
 		fprintf(stderr, "Rejected %u\n%s\n", status, answer);
 		closefd(&sock);
 		free(answer);
@@ -174,9 +174,8 @@ do_args(int sock, int argc, char * const *argv)
 	(void)close(sock);
 
 	printf("%s\n", answer);
-	if (status == CLIS_OK) {
+	if (status == CLIS_OK || status == CLIS_TRUNCATED)
 		exit(0);
-	}
 	fprintf(stderr, "Command failed with error code %u\n", status);
 	exit(1);
 }


More information about the varnish-commit mailing list