On 2005-07-17 10:04:19 -0700, Robert Spier wrote: > > The pre-connection and post-connection hooks are defined, but AFAICS > > they aren't actually called anywhere. > > The attached patch calls the pre-connection hook in fork-server. It doesn't > > touch tcpserver mode or Apache::Qpsmtp, and post-connection hook is > > still missing, so this is just a quick and dirty patch, not a real fix. > > > > PS: Look, Robert, no tabs :-) > > YAY! > > Except the patch touches a lot more than just the pre-connection > hook. We should remove the existing tabs separately from changing > code.
The first three chunks for qpsmtpd-forkserver only replace tabs with
spaces, right. I expanded tabs to spaces for the whole file before
making the diff, and that replaced a few tabs which already existed
before my changes. Should be fairly simple to separate, if you really
want to.
Other than that, all the chunks are related to the hook. I'm not sure if
all the moving around of code is necessary - the patch evolved during
the 0.29 days, and it took some time to get it right.
The important bits are:
* register is called only once in the parent process of forkserver
(actually twice, but this is already fixed in trunk, if I understood
another thread correctly). Previously, register was also called in the
child process.
* pre-connection is called after accept, but before fork. It knows the
ip addresses (local and remote) of the connection, so it can e.g.,
accept a different number of connections for different virtual hosts
or for known vs. unknown networks.
* startup is only called in the child, as before.
hp
--
_ | Peter J. Holzer | Ich sehe nun ein, dass Computer wenig
|_|_) | Sysadmin WSR | geeignet sind, um sich was zu merken.
| | | [EMAIL PROTECTED] |
__/ | http://www.hjp.at/ | -- Holger Lembke in dan-am
pgpoZM1O9RyD0.pgp
Description: PGP signature
