Commit ea5cda30 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add CLIS_COMMS errno (400) and return an error text as well.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@729 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent ef30e0ae
......@@ -179,7 +179,8 @@ enum cli_status_e {
CLIS_TOOMANY = 105,
CLIS_PARAM = 106,
CLIS_OK = 200,
CLIS_CANT = 300
CLIS_CANT = 300,
CLIS_COMMS = 400
};
/* Length of first line of response */
......
......@@ -110,6 +110,8 @@ cli_readres(int fd, unsigned *status, char **ptr, double tmo)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment