style: fix clang-format alignment and log allocation failure

Address CI clang-format check and CodeRabbit review feedback:
- Fix parameter alignment (one extra space)
- Log warning when response buffer allocation fails

(cherry picked from commit 3900ea1feb017c07bd5e38da0b471fe623ec506e)
This commit is contained in:
trilwu
2026-03-25 20:19:46 +01:00
committed by jpirnay
parent 10ea651e26
commit 08739746f8
+3 -1
View File
@@ -47,6 +47,8 @@ esp_err_t httpEventHandler(esp_http_client_event_t* evt) {
memcpy(buf->data + buf->len, evt->data, evt->data_len);
buf->len += evt->data_len;
buf->data[buf->len] = '\0';
} else {
LOG_ERR("KOSync", "Response buffer allocation failed (%d bytes)", evt->data_len);
}
}
return ESP_OK;
@@ -73,7 +75,7 @@ std::string base64Encode(const std::string& input) {
// Create configured esp_http_client with small TLS buffers
esp_http_client_handle_t createClient(const char* url, ResponseBuffer* buf,
esp_http_client_method_t method = HTTP_METHOD_GET) {
esp_http_client_method_t method = HTTP_METHOD_GET) {
esp_http_client_config_t config = {};
config.url = url;
config.event_handler = httpEventHandler;