Skip to content

Commit

Permalink
webserver: Help users to easily identify missing configurations
Browse files Browse the repository at this point in the history
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
  • Loading branch information
acassis and pkarashchenko committed Oct 4, 2022
1 parent 98a9d2c commit ed78d25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/webserver/webserver_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
* Pre-processor Definitions
****************************************************************************/

#ifndef CONFIG_NETUTILS_WEBSERVER
# error "CONFIG_NETUTILS_WEBSERVER is required to get WebServer working"
#endif

/****************************************************************************
* Private Data
****************************************************************************/
Expand Down
4 changes: 4 additions & 0 deletions include/netutils/httpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
* MSS value. Here we arbitrarily select the minimum MSS for that case.
*/

#ifndef MIN_TCP_MSS
# error "You need to enable TCP/IP (i.e. CONFIG_NET_TCP) to use HTTPD"
#endif

#define HTTPD_IOBUFFER_SIZE (3*MIN_TCP_MSS)

/* This is the maximum size of a file path */
Expand Down

0 comments on commit ed78d25

Please sign in to comment.