mirror of
https://github.com/simon987/sist2.git
synced 2025-04-19 10:16:42 +00:00
hotfix
This commit is contained in:
parent
e1aaaee617
commit
849beb09d8
@ -138,6 +138,7 @@ void elastic_flush() {
|
|||||||
|
|
||||||
LOG_INFOF("elastic.c", "Indexed %d documents (%zukB) <%d>", count, buf_cur / 1024, r->status_code);
|
LOG_INFOF("elastic.c", "Indexed %d documents (%zukB) <%d>", count, buf_cur / 1024, r->status_code);
|
||||||
|
|
||||||
|
if (r->status_code != 200 && r->status_code != 413) {
|
||||||
cJSON *ret_json = cJSON_Parse(r->body);
|
cJSON *ret_json = cJSON_Parse(r->body);
|
||||||
if (cJSON_GetObjectItem(ret_json, "errors")->valueint != 0) {
|
if (cJSON_GetObjectItem(ret_json, "errors")->valueint != 0) {
|
||||||
cJSON *err;
|
cJSON *err;
|
||||||
@ -151,6 +152,7 @@ void elastic_flush() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cJSON_Delete(ret_json);
|
cJSON_Delete(ret_json);
|
||||||
|
}
|
||||||
|
|
||||||
free_response(r);
|
free_response(r);
|
||||||
free(buf);
|
free(buf);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user