--------------------- PatchSet 3838 Date: 2006/10/06 16:51:36 Author: rousskov Branch: squid3-icap Tag: (none) Log: - Catch exceptions that the OPTIONS transaction may throw when it starts. This may happen, for example, when the connection to the ICAP server fails due to lack of file descriptors. There is no reason to propogate the exceptions upstream. NULL options structure is enough for the caller to understand that things went wrong. Members: src/ICAP/ICAPOptXact.cc:1.1.2.3->1.1.2.4 src/ICAP/ICAPOptXact.h:1.1.2.2->1.1.2.3 Index: squid3/src/ICAP/ICAPOptXact.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPOptXact.cc,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid3/src/ICAP/ICAPOptXact.cc 3 Oct 2006 18:17:52 -0000 1.1.2.3 +++ squid3/src/ICAP/ICAPOptXact.cc 6 Oct 2006 16:51:36 -0000 1.1.2.4 @@ -27,6 +27,7 @@ void ICAPOptXact::start(ICAPServiceRep::Pointer &aService, Callback *aCb, void *aCbData) { + ICAPXaction_Enter(start); service(aService); Must(!cb && aCb && aCbData); @@ -34,6 +35,8 @@ cbData = cbdataReference(aCbData); openConnection(); + + ICAPXaction_Exit(); } void ICAPOptXact::handleCommConnected() @@ -49,6 +52,12 @@ scheduleWrite(requestBuf); } +bool ICAPOptXact::doneAll() const +{ + return options && ICAPXaction::doneAll(); +} + + void ICAPOptXact::doStop() { ICAPXaction::doStop(); Index: squid3/src/ICAP/ICAPOptXact.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPOptXact.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/ICAP/ICAPOptXact.h 29 Sep 2006 23:27:15 -0000 1.1.2.2 +++ squid3/src/ICAP/ICAPOptXact.h 6 Oct 2006 16:51:36 -0000 1.1.2.3 @@ -1,5 +1,5 @@ /* - * $Id: ICAPOptXact.h,v 1.1.2.2 2006/09/29 23:27:15 dwsquid Exp $ + * $Id: ICAPOptXact.h,v 1.1.2.3 2006/10/06 16:51:36 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -59,6 +59,7 @@ virtual void handleCommConnected(); virtual void handleCommWrote(size_t size); virtual void handleCommRead(size_t size); + virtual bool doneAll() const; void makeRequest(MemBuf &buf); bool parseResponse();