From: Alex Rousskov Date: Tue, 23 Sep 2008 14:49:50 +0000 (-0600) Subject: Added Comm close handler for the data channel of FtpStateData X-Git-Tag: SQUID_3_1_0_1~49^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae5b4e1af356f125ee98d5d67da28995a7b38a71;p=thirdparty%2Fsquid.git 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. 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 close handler executed first will invalidate the transaction object. --- ae5b4e1af356f125ee98d5d67da28995a7b38a71