kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/fix_return_value_in_httpd_socket_apis_v4.4' into 'release/v4.4'
esp_http_server: fix return values for `httpd_socket_send()` and `httpd_socket_recv()` APIs (v4.4) See merge request espressif/esp-idf!22308pull/10984/head
commit
62340efd94
|
@ -604,10 +604,10 @@ int httpd_socket_send(httpd_handle_t hd, int sockfd, const char *buf, size_t buf
|
|||
{
|
||||
struct sock_db *sess = httpd_sess_get(hd, sockfd);
|
||||
if (!sess) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
return HTTPD_SOCK_ERR_INVALID;
|
||||
}
|
||||
if (!sess->send_fn) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
return HTTPD_SOCK_ERR_INVALID;
|
||||
}
|
||||
return sess->send_fn(hd, sockfd, buf, buf_len, flags);
|
||||
}
|
||||
|
@ -616,10 +616,10 @@ int httpd_socket_recv(httpd_handle_t hd, int sockfd, char *buf, size_t buf_len,
|
|||
{
|
||||
struct sock_db *sess = httpd_sess_get(hd, sockfd);
|
||||
if (!sess) {
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
return HTTPD_SOCK_ERR_INVALID;
|
||||
}
|
||||
if (!sess->recv_fn) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
return HTTPD_SOCK_ERR_INVALID;
|
||||
}
|
||||
return sess->recv_fn(hd, sockfd, buf, buf_len, flags);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue