On Mon, Jan 10, 2022 at 03:30:23PM +0100, Claudio Jeker wrote: > This diff changes the way the parser figures out which file to work on. > Until now the parent process sent a full path to the parser but that does > not work well with the idea of splitting the repo up into validated, rsync > and rrdp parts. > > So this diff changes the way the parser opens a file. There are now three > bits of information passed in struct entity. > - repoid: id of the repository to use, can be zero to indicate no repo. > - path: relative path from the base repo to the working directory where > file lives. Again this is optional and can be NULL. > - file: filename of the object to work on. This value has to be set. > > To make this work struct mft needs to pass the path and repoid back to the > parent so that the parent can build the next round of files to parse based > on that information. > > Right now the code should behave exactly the same as -current.
This works fine in my testing and also reads fine. I don't have a better suggestion for the path and file extraction in queue_add_from_cert(). ok only one tiny nit: > Index: parser.c > =================================================================== [...] > @@ -544,6 +589,37 @@ build_crls(const struct crl *crl, STACK_ > err(1, "sk_X509_CRL_push"); > } > > +static char * > +parse_filepath(struct entity *entp) > +{ > + struct parse_repo *rp; > + char *file; the alignment is strange