]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Christos Tsantilas <chtsanti@users.sourceforge.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Dec 2008 05:10:43 +0000 (18:10 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 14 Dec 2008 05:10:43 +0000 (18:10 +1300)
Bug 2508: comm.cc:2035 assertion fd_table[fd].closing()

The bug here is that the filedescriptor is not passed with the other
parameters to the asyncCall. If the filedescriptor closed before the asyncCall
scheduled the execution of the asyncCall will not canceled and the
ICAPXaction::noteCommConnected will try to read/write on a closed socket.

AYJ: Not entirely certain this fix and bug go together, but they appear
to and it definately fixes a different related assertion.

src/ICAP/ICAPXaction.cc

index f9bd294ca481f85a68e908568853302d34fd693d..f0958a2708bd651bea2470b5ce9a899a5b3197da 100644 (file)
@@ -84,6 +84,7 @@ void ICAPXaction::openConnection()
         // TODO: can we sync call ICAPXaction::noteCommConnected here instead?
         typedef CommCbMemFunT<ICAPXaction, CommConnectCbParams> Dialer;
         Dialer dialer(this, &ICAPXaction::noteCommConnected);
+       dialer.params.fd = connection;
         dialer.params.flag = COMM_OK;
         // fake other parameters by copying from the existing connection
         connector = asyncCall(93,3, "ICAPXaction::noteCommConnected", dialer);