From 74a6ee69e66df92e1ca716baf4d8cfeae2fe2649 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Mon, 26 Nov 2007 21:50:46 +0000 Subject: [PATCH] Allow to configure the maximum number of simultaneous connections to the cfs webserver. --- apps/webserver/httpd-cfs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/webserver/httpd-cfs.c b/apps/webserver/httpd-cfs.c index 3aee5951c..e1269850a 100644 --- a/apps/webserver/httpd-cfs.c +++ b/apps/webserver/httpd-cfs.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: httpd-cfs.c,v 1.5 2007/11/26 20:53:00 oliverschmidt Exp $ + * $Id: httpd-cfs.c,v 1.6 2007/11/26 21:50:46 oliverschmidt Exp $ */ #include @@ -44,11 +44,17 @@ #include "httpd-cfs.h" +#ifndef WEBSERVER_CONF_CFS_CONNS +#define CONNS 4 +#else /* WEBSERVER_CONF_CFS_CONNS */ +#define CONNS WEBSERVER_CONF_CFS_CONNS +#endif /* WEBSERVER_CONF_CFS_CONNS */ + #define STATE_WAITING 0 #define STATE_OUTPUT 1 #define SEND_STRING(s, str) PSOCK_SEND(s, (uint8_t *)str, strlen(str)) -MEMB(conns, struct httpd_state, 3); +MEMB(conns, struct httpd_state, CONNS); #define ISO_nl 0x0a #define ISO_space 0x20