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.
This archive was generated by hypermail 2.2.0 : Tue Sep 23 2008 - 12:00:04 MDT