Page 1 of 1

HTTPD_DEFAULT_CONFIG, overide settings

Posted: Wed Sep 26, 2018 10:53 pm
by mikemoy
Sorry for such a novice question. In http_server.h it has the following.

Code: Select all

#define HTTPD_DEFAULT_CONFIG() {                        \
        .task_priority      = tskIDLE_PRIORITY+5,       \
        .stack_size         = 4096,                     \
        .server_port        = 80,                       \
        .ctrl_port          = 32768,                    \
        .max_open_sockets   = 7,                        \
        .max_uri_handlers   = 8,                        \
        .max_resp_headers   = 8,                        \
        .backlog_conn       = 5,                        \
        .lru_purge_enable   = false,                    \
        .recv_wait_timeout  = 5,                        \
        .send_wait_timeout  = 5,                        \
};
in app_main() this is placed there.
static httpd_handle_t server = NULL;

My question is how can I change the value of "stack_size" ?

Re: HTTPD_DEFAULT_CONFIG, overide settings

Posted: Wed Jan 16, 2019 5:05 am
by mikemoy
Like this.

httpd_config_t config = HTTPD_DEFAULT_CONFIG();

// Lets bump up the stack size (default was 4096)
config.stack_size = 8192;

httpd_start(&OTA_server, &config)