From 2a98ace47746bf7f832c79ce4663f191ce00b53f Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Mon, 26 Nov 2007 21:36:35 +0000 Subject: [PATCH] Allow to configure the maximum number of simultaneous connections to the cgi webserver. --- apps/webserver/httpd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apps/webserver/httpd.c b/apps/webserver/httpd.c index 023d22005..dad7bd73e 100644 --- a/apps/webserver/httpd.c +++ b/apps/webserver/httpd.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: httpd.c,v 1.8 2007/11/25 23:31:11 oliverschmidt Exp $ + * $Id: httpd.c,v 1.9 2007/11/26 21:36:35 oliverschmidt Exp $ */ #include @@ -40,15 +40,22 @@ #include "webserver.h" #include "httpd-fs.h" #include "httpd-cgi.h" +#include "lib/petsciiconv.h" #include "http-strings.h" #include "httpd.h" +#ifndef WEBSERVER_CONF_CGI_CONNS +#define CONNS 4 +#else /* WEBSERVER_CONF_CGI_CONNS */ +#define CONNS WEBSERVER_CONF_CGI_CONNS +#endif /* WEBSERVER_CONF_CGI_CONNS */ + #define STATE_WAITING 0 #define STATE_OUTPUT 1 #define SEND_STRING(s, str) PSOCK_SEND(s, (uint8_t *)str, (unsigned int)strlen(str)) -MEMB(conns, struct httpd_state, 4); +MEMB(conns, struct httpd_state, CONNS); #define ISO_nl 0x0a #define ISO_space 0x20