Skip to content

Commit

Permalink
conditional return esp_tls_server_session_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
gojimmypi committed Sep 30, 2024
1 parent 3126b65 commit 041cd42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion components/esp-tls/esp_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,11 +715,17 @@ int esp_tls_server_session_create(esp_tls_cfg_server_t *cfg, int sockfd, esp_tls
/**
* @brief Close the server side TLS/SSL connection and free any allocated resources.
*/
#ifdef CONFIG_ESP_TLS_USING_WOLFSSL
int esp_tls_server_session_delete(esp_tls_t *tls)
{
return _esp_tls_server_session_delete(tls);
}
#else
void esp_tls_server_session_delete(esp_tls_t *tls)
{
return _esp_tls_server_session_delete(tls);
}

#endif
ssize_t esp_tls_get_bytes_avail(esp_tls_t *tls)
{
return _esp_tls_get_bytes_avail(tls);
Expand Down
5 changes: 4 additions & 1 deletion components/esp-tls/esp_tls.h
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,11 @@ int esp_tls_server_session_create(esp_tls_cfg_server_t *cfg, int sockfd, esp_tls
*
* @param[in] tls pointer to esp_tls_t
*/
#ifdef CONFIG_ESP_TLS_USING_WOLFSSL
int esp_tls_server_session_delete(esp_tls_t *tls);

#else
void esp_tls_server_session_delete(esp_tls_t *tls);
#endif
/**
* @brief Creates a plain TCP connection, returning a valid socket fd on success or an error handle
*
Expand Down

0 comments on commit 041cd42

Please sign in to comment.