Skip to content

Commit

Permalink
Merge branch 'bugfix/http-start' into 'master'
Browse files Browse the repository at this point in the history
bugfix: HTTPD start fails due to incorrect configuration

See merge request app-frameworks/esp-homekit-sdk!29
  • Loading branch information
shahpiyushv committed Feb 15, 2024
2 parents 68c049e + 24e4265 commit 43bab6f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions components/homekit/esp_hap_platform/src/hap_platform_httpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@
httpd_handle_t *int_handle;
int hap_platform_httpd_start(httpd_handle_t *handle)
{
httpd_config_t config = {
.task_priority = tskIDLE_PRIORITY+5,
.stack_size = CONFIG_HAP_HTTP_STACK_SIZE,
.server_port = CONFIG_HAP_HTTP_SERVER_PORT,
.ctrl_port = CONFIG_HAP_HTTP_CONTROL_PORT,
.max_open_sockets = CONFIG_HAP_HTTP_MAX_OPEN_SOCKETS,
.max_uri_handlers = CONFIG_HAP_HTTP_MAX_URI_HANDLERS,
.max_resp_headers = 8,
.backlog_conn = 5,
.lru_purge_enable = true,
.recv_wait_timeout = 5,
.send_wait_timeout = 5,
};
httpd_config_t config = HTTPD_DEFAULT_CONFIG();
config.task_priority = tskIDLE_PRIORITY+5;
config.stack_size = CONFIG_HAP_HTTP_STACK_SIZE;
config.server_port = CONFIG_HAP_HTTP_SERVER_PORT;
config.ctrl_port = CONFIG_HAP_HTTP_CONTROL_PORT;
config.max_open_sockets = CONFIG_HAP_HTTP_MAX_OPEN_SOCKETS;
config.max_uri_handlers = CONFIG_HAP_HTTP_MAX_URI_HANDLERS;
config.max_resp_headers = 8;
config.backlog_conn = 5;
config.lru_purge_enable = true;
config.recv_wait_timeout = 5;
config.send_wait_timeout = 5;

esp_err_t err = httpd_start(handle, &config);
if (err == ESP_OK) {
int_handle = handle;
Expand Down

0 comments on commit 43bab6f

Please sign in to comment.