Merge branch 'bugfix/ws_transport_ping' into 'master'

ws_transport: Add option to propagate control packets to the app

Closes IDFGH-4478

See merge request espressif/esp-idf!11957
This commit is contained in:
David Čermák
2021-01-22 19:21:43 +08:00
5 changed files with 296 additions and 20 deletions
@@ -29,6 +29,18 @@ extern "C" {
action; \
}
/**
* @brief Utility macro for checking the error code of esp_err_t
*/
#define ESP_TRANSPORT_ERR_OK_CHECK(TAG, err, action) \
{ \
esp_err_t _esp_transport_err_to_check = err; \
if (_esp_transport_err_to_check != ESP_OK) { \
ESP_LOGE(TAG,"%s(%d): Expected ESP_OK; reported: %d", __FUNCTION__, __LINE__, _esp_transport_err_to_check); \
action; \
} \
}
/**
* @brief Convert milliseconds to timeval struct for valid timeouts, otherwise
* (if "wait forever" requested by timeout_ms=-1) timeval structure is not updated and NULL returned