Commit fe0d340c authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by rojer

Tighten Mongoose footprint defaults

Explicitly loosen them on the "big" platforms.

PUBLISHED_FROM=b4786428402c5da55738d3f7085ab12acf884e74
parent 5a02c9db
...@@ -23,14 +23,7 @@ IPATH = . ../.. $(REPO_PATH) ...@@ -23,14 +23,7 @@ IPATH = . ../.. $(REPO_PATH)
VPATH = ../.. VPATH = ../..
MONGOOSE_FEATURES = \ MONGOOSE_FEATURES = -DMG_ENABLE_HTTP_STREAMING_MULTIPART
-DMG_DISABLE_DIRECTORY_LISTING \
-DMG_DISABLE_DAV \
-DMG_ENABLE_HTTP_STREAMING_MULTIPART \
-DMG_MAX_HTTP_HEADERS=20 \
-DMG_MAX_HTTP_REQUEST_SIZE=1024 \
-DMG_MAX_PATH=40 \
-DMG_MAX_HTTP_SEND_MBUF=1024
SDK_FLAGS = -DUSE_FREERTOS -DSL_PLATFORM_MULTI_THREADED SDK_FLAGS = -DUSE_FREERTOS -DSL_PLATFORM_MULTI_THREADED
# -DTARGET_IS_CC3200 would reduce code size by using functions in ROM # -DTARGET_IS_CC3200 would reduce code size by using functions in ROM
......
...@@ -26,8 +26,6 @@ endif ...@@ -26,8 +26,6 @@ endif
DEFINES += -DCS_PLATFORM=3 \ DEFINES += -DCS_PLATFORM=3 \
-DMG_NO_BSD_SOCKETS \ -DMG_NO_BSD_SOCKETS \
-DMG_DISABLE_FILESYSTEM \ -DMG_DISABLE_FILESYSTEM \
-DMG_MAX_HTTP_HEADERS=20 -DMG_MAX_HTTP_REQUEST_SIZE=1024 \
-DMG_MAX_PATH=40 -DMG_MAX_HTTP_SEND_MBUF=1024 \
-DRTOS_SDK -DMG_LWIP -DLWIP_TIMEVAL_PRIVATE=0 \ -DRTOS_SDK -DMG_LWIP -DLWIP_TIMEVAL_PRIVATE=0 \
-DMG_INTERNAL= -DMG_INTERNAL=
......
...@@ -239,6 +239,18 @@ struct dirent *readdir(DIR *dir); ...@@ -239,6 +239,18 @@ struct dirent *readdir(DIR *dir);
#endif #endif
#endif #endif
#ifndef MG_MAX_HTTP_REQUEST_SIZE
#define MG_MAX_HTTP_REQUEST_SIZE 8192
#endif
#ifndef MG_MAX_HTTP_SEND_MBUF
#define MG_MAX_HTTP_SEND_MBUF 4096
#endif
#ifndef MG_MAX_HTTP_HEADERS
#define MG_MAX_HTTP_HEADERS 40
#endif
#endif /* CS_PLATFORM == CS_P_WINDOWS */ #endif /* CS_PLATFORM == CS_P_WINDOWS */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_ */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_ */
#ifndef CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_ #ifndef CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_
...@@ -322,6 +334,18 @@ typedef struct stat cs_stat_t; ...@@ -322,6 +334,18 @@ typedef struct stat cs_stat_t;
#define closesocket(x) close(x) #define closesocket(x) close(x)
#ifndef MG_MAX_HTTP_REQUEST_SIZE
#define MG_MAX_HTTP_REQUEST_SIZE 8192
#endif
#ifndef MG_MAX_HTTP_SEND_MBUF
#define MG_MAX_HTTP_SEND_MBUF 4096
#endif
#ifndef MG_MAX_HTTP_HEADERS
#define MG_MAX_HTTP_HEADERS 40
#endif
#endif /* CS_PLATFORM == CS_P_UNIX */ #endif /* CS_PLATFORM == CS_P_UNIX */
#endif /* CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_ */ #endif /* CS_COMMON_PLATFORMS_PLATFORM_UNIX_H_ */
#ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP_LWIP_H_ #ifndef CS_COMMON_PLATFORMS_PLATFORM_ESP_LWIP_H_
...@@ -401,6 +425,11 @@ unsigned long os_random(void); ...@@ -401,6 +425,11 @@ unsigned long os_random(void);
#define MG_DISABLE_SYNC_RESOLVER 1 #define MG_DISABLE_SYNC_RESOLVER 1
#define MG_DISABLE_POPEN 1 #define MG_DISABLE_POPEN 1
#define MG_DISABLE_CGI 1 #define MG_DISABLE_CGI 1
/* Only SPIFFS supports directories, SLFS does not. */
#ifndef CC3200_FS_SPIFFS
#define MG_DISABLE_DAV 1
#define MG_DISABLE_DIRECTORY_LISTING 1
#endif
#include <simplelink/include/simplelink.h> #include <simplelink/include/simplelink.h>
...@@ -1922,23 +1951,23 @@ extern "C" { ...@@ -1922,23 +1951,23 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#ifndef MG_MAX_HTTP_HEADERS #ifndef MG_MAX_HTTP_HEADERS
#define MG_MAX_HTTP_HEADERS 40 #define MG_MAX_HTTP_HEADERS 20
#endif #endif
#ifndef MG_MAX_HTTP_REQUEST_SIZE #ifndef MG_MAX_HTTP_REQUEST_SIZE
#define MG_MAX_HTTP_REQUEST_SIZE 8192 #define MG_MAX_HTTP_REQUEST_SIZE 1024
#endif #endif
#ifndef MG_MAX_PATH #ifndef MG_MAX_PATH
#ifdef PATH_MAX #ifdef PATH_MAX
#define MG_MAX_PATH PATH_MAX #define MG_MAX_PATH PATH_MAX
#else #else
#define MG_MAX_PATH 1024 #define MG_MAX_PATH 256
#endif #endif
#endif #endif
#ifndef MG_MAX_HTTP_SEND_MBUF #ifndef MG_MAX_HTTP_SEND_MBUF
#define MG_MAX_HTTP_SEND_MBUF 4096 #define MG_MAX_HTTP_SEND_MBUF 1024
#endif #endif
#ifndef MG_WEBSOCKET_PING_INTERVAL_SECONDS #ifndef MG_WEBSOCKET_PING_INTERVAL_SECONDS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment