feat(upload): remove event.json from tar.gz upload
- Drop write_event_json() calls from upload_thread and test_upload_thread - tar.gz now contains JPEG snapshots only (no event.json) - Mark write_event_json() as __attribute__((unused)) to suppress compiler warning
This commit is contained in:
parent
2081c7b1f5
commit
384990fb8d
@ -329,6 +329,7 @@ static void make_work_dir(const char *event_id, char *out, size_t n)
|
||||
mkdir(out, 0755);
|
||||
}
|
||||
|
||||
__attribute__((unused))
|
||||
static void write_event_json(const char *work_dir, const char *event_id,
|
||||
const char *type, int max_level,
|
||||
float duration_sec,
|
||||
@ -677,13 +678,6 @@ static void *test_upload_thread(void *arg)
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
/* Write event.json */
|
||||
char imgs[4][64];
|
||||
memset(imgs, 0, sizeof(imgs));
|
||||
snprintf(imgs[0], sizeof(imgs[0]), "%s", snap_name);
|
||||
write_event_json(work_dir, event_id, evt_type, 1, duration,
|
||||
has_snap ? (const char (*)[64])imgs : NULL, has_snap ? 1 : 0);
|
||||
|
||||
/* Build tar.gz */
|
||||
char tgz_path[384];
|
||||
build_targz(work_dir, event_id, tgz_path, sizeof(tgz_path));
|
||||
@ -1099,11 +1093,6 @@ static void *upload_thread(void *arg)
|
||||
usleep((useconds_t)a->delay_ms * 1000);
|
||||
}
|
||||
|
||||
printf("[EVT] upload: writing event.json to %s\n", a->work_dir);
|
||||
write_event_json(a->work_dir, a->event_id, a->event_type,
|
||||
a->max_level, a->duration_sec,
|
||||
(const char (*)[64])a->images, a->image_count);
|
||||
|
||||
printf("[EVT] upload: building tar.gz\n");
|
||||
char tgz_path[384];
|
||||
build_targz(a->work_dir, a->event_id, tgz_path, sizeof(tgz_path));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user