Merge branch 'master' of github.com:cesanta/mongoose

This commit is contained in:
cpq
2023-05-24 21:02:23 +01:00
3 changed files with 5 additions and 4 deletions
@@ -51,7 +51,7 @@ extern uint32_t SystemCoreClock;
#define configCPU_CLOCK_HZ (SystemCoreClock)
#define configTICK_RATE_HZ ((TickType_t)1000)
#define configTOTAL_HEAP_SIZE ((size_t)1024 * 128)
#define configMINIMAL_STACK_SIZE ((uint16_t)128)
#define configMINIMAL_STACK_SIZE ((uint16_t)256)
#define configSUPPORT_DYNAMIC_ALLOCATION 1
#define configSUPPORT_STATIC_ALLOCATION 0
@@ -51,7 +51,7 @@
// <o>Minimal stack size [words] <0-65535>
// <i> Stack for idle task and default task stack in words.
// <i> Default: 128
#define configMINIMAL_STACK_SIZE ((uint16_t)(128))
#define configMINIMAL_STACK_SIZE ((uint16_t)(256))
// <o>Total heap size [bytes] <0-0xFFFFFFFF>
// <i> Heap memory size in bytes.
+3 -2
View File
@@ -28,7 +28,7 @@ struct dhcp {
unsigned long lease_time_sec;
};
static struct dhcp s_dhcp = {true, 10, 255, 86400};
static struct dhcp s_dhcp = {true, 10, 250, 86400};
// Mocked events
static struct event s_events[] = {
@@ -185,7 +185,8 @@ static void handle_events_get(struct mg_connection *c) {
}
static void handle_dhcp_set(struct mg_connection *c, struct mg_str body) {
struct dhcp dhcp = {};
struct dhcp dhcp;
memset(&dhcp, 0, sizeof(dhcp));
mg_json_get_bool(body, "$.enabled", &dhcp.enabled);
dhcp.address_begin = mg_json_get_long(body, "$.address_begin", 0);
dhcp.address_end = mg_json_get_long(body, "$.address_end", 0);