style: updated comments
This commit is contained in:
1 parent
dc7cf99926
commit
a39d9d40cf
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -123,7 +123,7 @@ extern "C"
|
|||||||
* @return ESP_FAIL if socket creation fails
|
* @return ESP_FAIL if socket creation fails
|
||||||
*
|
*
|
||||||
* @note Connection to the network must be established before calling this function.
|
* @note Connection to the network must be established before calling this function.
|
||||||
* @note Before initialize the syslog client recommend initialize zh_syslog_init_config_t structure with default values.
|
* @note Before initializing the syslog client, it is recommended to initialize the zh_syslog_init_config_t structure with default values.
|
||||||
*/
|
*/
|
||||||
esp_err_t zh_syslog_init(const zh_syslog_init_config_t *config);
|
esp_err_t zh_syslog_init(const zh_syslog_init_config_t *config);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ esp_err_t zh_syslog_send(const zh_syslog_facility_code_t facility, const zh_sysl
|
|||||||
ZH_ERROR_CHECK(payload != NULL, ESP_ERR_NO_MEM, NULL, "Syslog client send fail. Memory allocation fail or no free memory in the heap.");
|
ZH_ERROR_CHECK(payload != NULL, ESP_ERR_NO_MEM, NULL, "Syslog client send fail. Memory allocation fail or no free memory in the heap.");
|
||||||
sprintf(payload, "<%d>1 - %s %s - - - %s", ((uint8_t)facility * 8) + (uint8_t)severity, hostname, app_name, message);
|
sprintf(payload, "<%d>1 - %s %s - - - %s", ((uint8_t)facility * 8) + (uint8_t)severity, hostname, app_name, message);
|
||||||
int temp = sendto(_socket, payload, strlen(payload), 0, (struct sockaddr *)&_syslog_server, sizeof(_syslog_server)); // -V641
|
int temp = sendto(_socket, payload, strlen(payload), 0, (struct sockaddr *)&_syslog_server, sizeof(_syslog_server)); // -V641
|
||||||
ZH_ERROR_CHECK(temp >= 0, ESP_FAIL, heap_caps_free(payload), "Syslog client send fail. Socker error.");
|
ZH_ERROR_CHECK(temp >= 0, ESP_FAIL, heap_caps_free(payload), "Syslog client send fail. Socket error.");
|
||||||
heap_caps_free(payload);
|
heap_caps_free(payload);
|
||||||
ESP_LOGI(TAG, "Syslog client send success.");
|
ESP_LOGI(TAG, "Syslog client send success.");
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
|
|||||||
Reference in new issue
Block a user