-const char jcc_rcs[] = "$Id: jcc.c,v 1.269 2009/07/13 17:08:41 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.270 2009/07/13 17:12:28 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
{
chat(csp);
+ if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE)
+ && !(csp->flags & CSP_FLAG_SERVER_KEEP_ALIVE_TIMEOUT_SET))
+ {
+ log_error(LOG_LEVEL_CONNECT, "The server didn't specify how long "
+ "the connection will stay open. Assume it's only a second.");
+ csp->server_connection.keep_alive_timeout = 1;
+ }
+
continue_chatting = (csp->config->feature_flags
& RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE)
&& (csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE)
-const char parsers_rcs[] = "$Id: parsers.c,v 1.196 2009/07/11 11:20:12 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.197 2009/07/13 17:10:57 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/parsers.c,v $
"Server keep-alive timeout is %u. Sticking with %u.",
keep_alive_timeout, csp->server_connection.keep_alive_timeout);
}
+ csp->flags |= CSP_FLAG_SERVER_KEEP_ALIVE_TIMEOUT_SET;
}
return JB_ERR_OK;
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.145 2009/07/13 19:16:15 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.146 2009/07/14 17:45:05 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
*/
#define CSP_FLAG_CLIENT_REQUEST_COMPLETELY_READ 0x00010000U
+/**
+ * Flag for csp->flags: Set if the server promised us to
+ * keep the connection open for a known number of seconds.
+ */
+#define CSP_FLAG_SERVER_KEEP_ALIVE_TIMEOUT_SET 0x00020000U
+
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
/**
* Flag for csp->flags: Set if we think we can't reuse
* the server socket.
*/
-#define CSP_FLAG_SERVER_SOCKET_TAINTED 0x00020000U
+#define CSP_FLAG_SERVER_SOCKET_TAINTED 0x00040000U
/*
* Flags for use in return codes of child processes