r729 - in trunk/varnish-cache: include lib/libvarnish

phk at projects.linpro.no phk at projects.linpro.no
Mon Aug 7 18:14:37 CEST 2006


Author: phk
Date: 2006-08-07 18:14:37 +0200 (Mon, 07 Aug 2006)
New Revision: 729

Modified:
   trunk/varnish-cache/include/cli.h
   trunk/varnish-cache/lib/libvarnish/cli_common.c
Log:
Add CLIS_COMMS errno (400) and return an error text as well.



Modified: trunk/varnish-cache/include/cli.h
===================================================================
--- trunk/varnish-cache/include/cli.h	2006-08-07 16:11:29 UTC (rev 728)
+++ trunk/varnish-cache/include/cli.h	2006-08-07 16:14:37 UTC (rev 729)
@@ -179,7 +179,8 @@
 	CLIS_TOOMANY	= 105,
 	CLIS_PARAM	= 106,
 	CLIS_OK		= 200,
-	CLIS_CANT	= 300
+	CLIS_CANT	= 300,
+	CLIS_COMMS	= 400
 };
 
 /* Length of first line of response */

Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/cli_common.c	2006-08-07 16:11:29 UTC (rev 728)
+++ trunk/varnish-cache/lib/libvarnish/cli_common.c	2006-08-07 16:14:37 UTC (rev 729)
@@ -110,6 +110,8 @@
 	if (i != CLI_LINE0_LEN) {
 		if (status != NULL)
 			*status = CLIS_COMMS;
+		if (ptr != NULL)
+			*ptr = strdup("CLI communication error");
 		return (1);
 	}
 	assert(i == CLI_LINE0_LEN);




More information about the varnish-commit mailing list