From f22b0dffb33305f9debfd4ff147b45d70dd32ab3 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Sun, 11 Apr 2010 20:10:12 +0000 Subject: [PATCH] Made CFS web server pathname length configurable via WEBSERVER_CONF_CFS_PATHLEN and increased default pathname length from 20 to 80 chars in order to allow to actually make use of subdirs. --- apps/webserver/httpd-cfs.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/webserver/httpd-cfs.h b/apps/webserver/httpd-cfs.h index f5f138d9e..8f8fc1203 100644 --- a/apps/webserver/httpd-cfs.h +++ b/apps/webserver/httpd-cfs.h @@ -28,7 +28,7 @@ * * This file is part of the uIP TCP/IP stack. * - * $Id: httpd-cfs.h,v 1.2 2007/04/23 23:08:44 oliverschmidt Exp $ + * $Id: httpd-cfs.h,v 1.3 2010/04/11 20:10:12 oliverschmidt Exp $ * */ @@ -37,13 +37,19 @@ #include "contiki-net.h" +#ifndef WEBSERVER_CONF_CFS_PATHLEN +#define HTTPD_PATHLEN 80 +#else /* WEBSERVER_CONF_CFS_CONNS */ +#define HTTPD_PATHLEN WEBSERVER_CONF_CFS_PATHLEN +#endif /* WEBSERVER_CONF_CFS_CONNS */ + struct httpd_state { struct timer timer; struct psock sin, sout; struct pt outputpt; - char inputbuf[50]; + char inputbuf[HTTPD_PATHLEN + 30]; char outputbuf[UIP_TCP_MSS]; - char filename[20]; + char filename[HTTPD_PATHLEN]; char state; int fd; int len;