aboutsummaryrefslogtreecommitdiff
path: root/src/process_image.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-01-10 12:24:53 +0100
committerThomas White <taw@physics.org>2022-06-02 12:15:38 +0200
commitbe3595c63e5d310624f03be05cb2d2006c4963d2 (patch)
treeab936ffc8c8b8fb28ea2acf20388c92a83a4454e /src/process_image.c
parent79f8df1c73f2cb2baab96750263bf99d89971691 (diff)
Generate placeholder filename/event earlier
Previously, a placeholder was put in the queue ("ZMQdata //" or "ASAPOdata //"), and replaced by image_read_data_block. Instead, the "final" placeholder can be put in the queue already. Note that ASAP::O, at least, will replace this placeholder with a filename delivered by the data transport.
Diffstat (limited to 'src/process_image.c')
-rw-r--r--src/process_image.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/process_image.c b/src/process_image.c
index 9151528d..71be87cc 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -199,6 +199,14 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
iargs->no_mask_data);
profile_end("read-data-block");
if ( image == NULL ) return;
+
+ /* image_read_data_block() will leave the filename/event as
+ * NULL, because there's no file (duh). Fill them in now with
+ * the values passed down to us. These values might be
+ * meaningful (e.g. ASAP::O), or just placeholders. */
+ image->filename = strdup(pargs->filename);
+ image->ev = strdup(pargs->event);
+
} else {
profile_start("file-wait-open-read");
image = file_wait_open_read(pargs->filename, pargs->event,