aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-03-08 19:44:06 +0100
committerThomas White <taw@physics.org>2019-03-14 11:36:57 +0100
commit994c14337ecf9a754ebd40ca78fc384a527cd353 (patch)
tree38f9bc3bd0b2f7bb34de4dd6c54c41186e4eb52b /src/process_image.c
parentde09b82310f7b464e4095d1b750d9b968c84b6ed (diff)
More ZMQ/MsgPack logic fixes
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c8
1 files changed, 4 insertions, 4 deletions
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);
}