From 0ce4e8d52fd491268a56c10dbb32fd5c996e2589 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sat, 1 Feb 2020 13:07:46 +0100 Subject: Initial Python infrastructure to build more complex processing pipelines and the corresponding changes in ROOF filters --- src/ufo-roof-read-file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ufo-roof-read-file.c') diff --git a/src/ufo-roof-read-file.c b/src/ufo-roof-read-file.c index a5eb69b..4ee11c6 100644 --- a/src/ufo-roof-read-file.c +++ b/src/ufo-roof-read-file.c @@ -55,7 +55,7 @@ static guint ufo_roof_read_file(UfoRoofReadInterface *iface, uint8_t *buffers, G } -UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GError **error) { +UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, const char *path, guint file_id, GError **error) { UfoRoofReadFile *reader = (UfoRoofReadFile*)calloc(1, sizeof(UfoRoofReadFile)); if (!reader) roof_new_error(error, "Can't allocate UfoRoofReadFile"); @@ -67,7 +67,7 @@ UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GErro reader->iface.close = ufo_roof_read_file_free; reader->iface.read =ufo_roof_read_file; - reader->fname = g_strdup_printf(cfg->path, id + cfg->first_file_number); + reader->fname = g_strdup_printf(path, file_id); if (!reader->fname) { free(reader); roof_new_error(error, "Can't build file name"); @@ -77,7 +77,7 @@ UfoRoofReadInterface *ufo_roof_read_file_new(UfoRoofConfig *cfg, guint id, GErro if (!reader->fd) { g_free(reader->fname); g_free(reader); - roof_new_error(error, "Can't open file %s", reader->fname); + roof_new_error(error, "Can't open file %i at path %s", file_id, path); } return (UfoRoofReadInterface*)reader; -- cgit v1.2.3