Allow to configure the maximum number of simultaneous connections to the cgi webserver.
This commit is contained in:
parent
ac55fb90e7
commit
2a98ace477
1 changed files with 9 additions and 2 deletions
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $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 <string.h>
|
#include <string.h>
|
||||||
|
@ -40,15 +40,22 @@
|
||||||
#include "webserver.h"
|
#include "webserver.h"
|
||||||
#include "httpd-fs.h"
|
#include "httpd-fs.h"
|
||||||
#include "httpd-cgi.h"
|
#include "httpd-cgi.h"
|
||||||
|
#include "lib/petsciiconv.h"
|
||||||
#include "http-strings.h"
|
#include "http-strings.h"
|
||||||
|
|
||||||
#include "httpd.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_WAITING 0
|
||||||
#define STATE_OUTPUT 1
|
#define STATE_OUTPUT 1
|
||||||
|
|
||||||
#define SEND_STRING(s, str) PSOCK_SEND(s, (uint8_t *)str, (unsigned int)strlen(str))
|
#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_nl 0x0a
|
||||||
#define ISO_space 0x20
|
#define ISO_space 0x20
|
||||||
|
|
Loading…
Reference in a new issue