Re: Qpsmtpd::Transaction::body_fh

2009-04-07 Thread Hanno Hecker
On Tue, 7 Apr 2009 09:57:37 -0500 Jared Johnson wrote: > When I updated the documentation I noticed that body_fh() is actually > documented to return undef in the event that the body is not yet spooled > to disk. I assumed that it was an oversight that body_fh didn't call > body_spool() simil

Re: Qpsmtpd::Transaction::body_fh

2009-04-07 Thread Jared Johnson
So, after some more extensive testing, we've found that dup'ing body fh's all over the place and then writing to different ones can cause some problems. So I think I will submit my dup() enhancement as a separate function, dup_body_fh(). When I updated the documentation I noticed that body_fh

Re: Qpsmtpd::Transaction::body_fh

2009-04-01 Thread Jared Johnson
Based on my testing, it looks like body_resetpos() behavior would be unaffected by the dup(). I didn't realize this was the case, so my mention of 'if we happen to seek() to the wrong place bad things won't happen' is not exactly accurate. But this is probably for the best; although I would n

Re: Qpsmtpd::Transaction::body_fh

2009-03-30 Thread Robert Spier
Most plugins call body_resetpos before using the FH. -R Jared Johnson wrote: > > I'm considering submitting a patch that enhances > Qspmtpd::Transaction::body_fh() to (1) call body_spool() if the > message was not already spooled to disk; and (2) dup the filehandle > before returning it, so th