-const char gateway_rcs[] = "$Id: gateway.c,v 1.49 2009/05/10 10:12:30 fabiankeil Exp $";
+const char gateway_rcs[] = "$Id: gateway.c,v 1.50 2009/05/10 10:19:23 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.c,v $
*
* Revisions :
* $Log: gateway.c,v $
+ * Revision 1.50 2009/05/10 10:19:23 fabiankeil
+ * Reenable server-side-only keep-alive support, but only share
+ * outgoing connections if the connection-sharing option is set.
+ *
* Revision 1.49 2009/05/10 10:12:30 fabiankeil
* Initial keep-alive support for the client socket.
* Temporarily disable the server-side-only keep-alive code.
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
#define MAX_REUSABLE_CONNECTIONS 100
-static int keep_alive_timeout = DEFAULT_KEEP_ALIVE_TIMEOUT;
+static unsigned int keep_alive_timeout = DEFAULT_KEEP_ALIVE_TIMEOUT;
static struct reusable_connection reusable_connection[MAX_REUSABLE_CONNECTIONS];
static int mark_connection_unused(jb_socket sfd);
* Returns : void
*
*********************************************************************/
-void set_keep_alive_timeout(int timeout)
+void set_keep_alive_timeout(unsigned int timeout)
{
keep_alive_timeout = timeout;
}
#ifndef GATEWAY_H_INCLUDED
#define GATEWAY_H_INCLUDED
-#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.12 2008/12/24 17:06:19 fabiankeil Exp $"
+#define GATEWAY_H_VERSION "$Id: gateway.h,v 1.13 2009/05/10 10:12:30 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/gateway.h,v $
*
* Revisions :
* $Log: gateway.h,v $
+ * Revision 1.13 2009/05/10 10:12:30 fabiankeil
+ * Initial keep-alive support for the client socket.
+ * Temporarily disable the server-side-only keep-alive code.
+ *
* Revision 1.12 2008/12/24 17:06:19 fabiankeil
* Keep a thread around to timeout alive connections
* even if no new requests are coming in.
*/
#define DEFAULT_KEEP_ALIVE_TIMEOUT 180
-extern void set_keep_alive_timeout(int timeout);
+extern void set_keep_alive_timeout(unsigned int timeout);
extern void initialize_reusable_connections(void);
extern void forget_connection(jb_socket sfd);
extern void remember_connection(jb_socket sfd,
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.99 2009/05/10 10:12:30 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.100 2009/05/10 10:19:23 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.100 2009/05/10 10:19:23 fabiankeil
+ * Reenable server-side-only keep-alive support, but only share
+ * outgoing connections if the connection-sharing option is set.
+ *
* Revision 1.99 2009/05/10 10:12:30 fabiankeil
* Initial keep-alive support for the client socket.
* Temporarily disable the server-side-only keep-alive code.
if (0 <= timeout)
{
config->feature_flags |= RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE;
- config->keep_alive_timeout = timeout;
+ config->keep_alive_timeout = (unsigned int)timeout;
}
else
{
#ifndef PROJECT_H_INCLUDED
#define PROJECT_H_INCLUDED
/** Version string. */
-#define PROJECT_H_VERSION "$Id: project.h,v 1.134 2009/05/10 10:12:30 fabiankeil Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.135 2009/05/10 10:19:23 fabiankeil Exp $"
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/project.h,v $
*
* Revisions :
* $Log: project.h,v $
+ * Revision 1.135 2009/05/10 10:19:23 fabiankeil
+ * Reenable server-side-only keep-alive support, but only share
+ * outgoing connections if the connection-sharing option is set.
+ *
* Revision 1.134 2009/05/10 10:12:30 fabiankeil
* Initial keep-alive support for the client socket.
* Temporarily disable the server-side-only keep-alive code.
#ifdef FEATURE_CONNECTION_KEEP_ALIVE
/* Number of seconds after which an open connection will no longer be reused. */
- int keep_alive_timeout;
+ unsigned int keep_alive_timeout;
#endif
/** All options from the config file, HTML-formatted. */