More bug fixes...

This commit is contained in:
simon987 2020-04-20 09:55:46 -04:00
parent 60d711721a
commit a9cd6a45ac
3 changed files with 5 additions and 2 deletions

View File

@ -295,6 +295,9 @@ void read_index_bin(const char *path, const char *index_id, index_func func) {
case MetaExifIsoSpeedRatings: case MetaExifIsoSpeedRatings:
case MetaExifDateTime: case MetaExifDateTime:
case MetaExifModel: case MetaExifModel:
case MetaAuthor:
case MetaModifiedBy:
case MetaThumbnail:
case MetaTitle: { case MetaTitle: {
buf.cur = 0; buf.cur = 0;
while ((c = getc(file)) != 0) { while ((c = getc(file)) != 0) {

View File

@ -269,6 +269,7 @@ void document_info(struct mg_connection *nc, struct http_message *hm, struct mg_
char *json_str = cJSON_PrintUnformatted(source); char *json_str = cJSON_PrintUnformatted(source);
send_response_line(nc, 200, (int) strlen(json_str), "Content-Type: application/json"); send_response_line(nc, 200, (int) strlen(json_str), "Content-Type: application/json");
mg_send(nc, json_str, (int) strlen(json_str));
free(json_str); free(json_str);
cJSON_Delete(doc); cJSON_Delete(doc);
@ -392,7 +393,6 @@ static void ev_router(struct mg_connection *nc, int ev, void *p) {
send_response_line(nc, 200, r->size, "Content-Type: application/json"); send_response_line(nc, 200, r->size, "Content-Type: application/json");
mg_send(nc, r->body, r->size); mg_send(nc, r->body, r->size);
} else { } else {
fprintf(stderr, "ERR \n%s", r->body);
sist_log("serve.c", SIST_WARNING, "ElasticSearch error during query"); sist_log("serve.c", SIST_WARNING, "ElasticSearch error during query");
if (r->size != 0) { if (r->size != 0) {
char *tmp = malloc(r->size + 1); char *tmp = malloc(r->size + 1);

2
third-party/libscan vendored

@ -1 +1 @@
Subproject commit 67a5da9ac0baba7fdba03a59d87f48e9e65db019 Subproject commit e1ad26d0c6a3bd46bec40f4a693a76c0013b2c0a