From 994c14337ecf9a754ebd40ca78fc384a527cd353 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 8 Mar 2019 19:44:06 +0100 Subject: More ZMQ/MsgPack logic fixes --- src/process_image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/process_image.c') diff --git a/src/process_image.c b/src/process_image.c index 3dd02aaa..acd85bcb 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -214,12 +214,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, image.serial = serial; image.indexed_by = INDEXING_NONE; + image.filename = pargs->filename_p_e->filename; + image.event = pargs->filename_p_e->ev; if ( pargs->msgpack_obj != NULL ) { STATUS("Msgpack!\n"); if ( unpack_msgpack_data(pargs->msgpack_obj, &image) ) return; - } else if ( pargs->filename_p_e != NULL ) { - image.filename = pargs->filename_p_e->filename; - image.event = pargs->filename_p_e->ev; + } else { if ( file_wait_open_read(sb_shared, &image, taccs, last_task, iargs->wait_for_file, cookie, &imfile) ) return; @@ -500,5 +500,5 @@ out: image_feature_list_free(image.features); free_detector_geometry(image.det); - imagefile_close(imfile); + if ( imfile != NULL ) imagefile_close(imfile); } -- cgit v1.2.3