makehistory can generate duplicate lines
Julien ÉLIE
julien at trigofacile.com
Tue Nov 22 23:15:27 UTC 2022
Hi Kamil,
>> But I am almost sure that this is still something wrong with
>> makehistory/cnfs code.
>> It is not understandable for me that first article during scanning spool
>> has different cycle number than others. (On fully wrapped buffer)
Ah yes, there also was that 3rd bug!
1st - duplicate entry returned by makehistory on fully wrapped cycbuff
2nd - untimely expiry of the first article of a fully wrapped cycbuff
3rd - off-by-one cycle number of the first article of a fully wrapped
cycbuff returned by makehistory
> --8<---------------cut here---------------start------------->8---
> token = CNFSMakeToken(cycbuff->name, offset, cycbuff->blksz,
> (offset > cycbuff->free) ? cycbuff->cyclenum - 1
> : cycbuff->cyclenum,
> cah.class);
> --8<---------------cut here---------------end--------------->8---
Indeed, in cnfs_next() called by makehistory, the first article has
offset == cycbuff->free, with cycle number already set to the next one.
So I believe this patch fixes that 3rd bug. I'll test it soon to make sure.
--
Julien ÉLIE
« Quand j'étais petit, je séchais la natation. » (Philippe Geluck)
More information about the inn-workers
mailing list