Hi!

On Mon, 2 Jun 2003, HIROSHIMA Naoki wrote:
>andy,
>Andreas Aardal Hanssen wrote:
>> The only safe approach to COPY/APPEND with flags is to store the messages 
>> in new/ with no flags, then move the messages to cur/ with flags after one 
>> whole second has passed. I'm looking into this solution now.
>what do you think about the attached new patch?
>i am sure that this must be much better than previous one... though...

This patch is much closer to what we want, Hiroshima. Good work!

It needs two more features: Check that each file is not linked from new/
to cur/ until it is at least one second old. So before the copy loop,
check gettimeofday() and optionally sleep for as long as it takes for the
message(s) to get one second old.

Also, if the link fails because the original does not exist (EEXIST), that
suggests that a concurrent server instance moved it for you, so that
should not be treated as an error - simply skip to the next file.

Andy :-)

-- 
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP    | Nil desperandum

Reply via email to