Alex Rousskov wrote:
Added Comm close handler for the data channel of FtpStateData
transaction in preparation for officially dropping connect callbacks for
closing descriptors.

The data channel can be opened and closed a few times and the descriptor
must be kept in sync with the close handler. I factored out the
open/closing code into a simple FtpChannel class. That class is now used
for both FTP control and data channels.

Similar code appears to work in my tests and more tests will be done
tomorrow. The changes resolve one XXX discussion regarding FTP not
having a close handler for the data channel. On the other hand, adding a
second close handler attached to the same transaction is not a trivial
change as the side-effects of Squid cleanup code are often illusive.
For example, I suspect that FTP cleanup code does not close or even
check the control channel. I added a DBG_IMPORTANT statement to test
whether the control channel remains open. Or should that be an assert()?

I think that only one out of the two callbacks can be dialed because the
first close handler will invalidate the transaction object.


Thank you,

Alex.


bb:approve

Amos
--
Please use Squid 2.7.STABLE4 or 3.0.STABLE9

Reply via email to