--------------------- PatchSet 6009 Date: 2007/10/25 16:41:20 Author: chtsanti Branch: async-calls Tag: (none) Log: - Make the AsyncJob::toCbdata() pure virtual again. Implementing this method for AsyncJob was completely wrong. - The ClientHttpRequest and FtpStateData uses CBDATA_CLASS (not the CBDATA_CLASS2) which does not implements the toCbdata() method, so must implements this method - Remove the toCbdata() method implementation from ICAPInitiator and ICAPLauncher classes, does not needed any more Members: src/client_side_request.h:1.30.4.2->1.30.4.3 src/ftp.cc:1.89.4.2->1.89.4.3 src/ICAP/AsyncJob.h:1.3.14.3->1.3.14.4 src/ICAP/ICAPInitiator.h:1.3.22.1->1.3.22.2 src/ICAP/ICAPLauncher.h:1.2->1.2.30.1 Index: squid3/src/client_side_request.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.h,v retrieving revision 1.30.4.2 retrieving revision 1.30.4.3 diff -u -r1.30.4.2 -r1.30.4.3 --- squid3/src/client_side_request.h 23 Oct 2007 22:17:06 -0000 1.30.4.2 +++ squid3/src/client_side_request.h 25 Oct 2007 16:41:20 -0000 1.30.4.3 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.h,v 1.30.4.2 2007/10/23 22:17:06 chtsanti Exp $ + * $Id: client_side_request.h,v 1.30.4.3 2007/10/25 16:41:20 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -69,7 +69,9 @@ public: void *operator new (size_t); void operator delete (void *); - +#if ICAP_CLIENT + void *toCbdata() { return this; } +#endif ClientHttpRequest(ConnStateData::Pointer); ~ClientHttpRequest(); /* Not implemented - present to prevent synthetic operations */ Index: squid3/src/ftp.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ftp.cc,v retrieving revision 1.89.4.2 retrieving revision 1.89.4.3 diff -u -r1.89.4.2 -r1.89.4.3 --- squid3/src/ftp.cc 24 Oct 2007 17:20:49 -0000 1.89.4.2 +++ squid3/src/ftp.cc 25 Oct 2007 16:41:20 -0000 1.89.4.3 @@ -1,5 +1,5 @@ /* - * $Id: ftp.cc,v 1.89.4.2 2007/10/24 17:20:49 chtsanti Exp $ + * $Id: ftp.cc,v 1.89.4.3 2007/10/25 16:41:20 chtsanti Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -111,6 +111,8 @@ public: void *operator new (size_t); void operator delete (void *); + void *toCbdata() { return this; } + FtpStateData(FwdState *); ~FtpStateData(); char user[MAX_URL]; Index: squid3/src/ICAP/AsyncJob.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/AsyncJob.h,v retrieving revision 1.3.14.3 retrieving revision 1.3.14.4 diff -u -r1.3.14.3 -r1.3.14.4 --- squid3/src/ICAP/AsyncJob.h 23 Oct 2007 19:47:28 -0000 1.3.14.3 +++ squid3/src/ICAP/AsyncJob.h 25 Oct 2007 16:41:21 -0000 1.3.14.4 @@ -1,6 +1,6 @@ /* - * $Id: AsyncJob.h,v 1.3.14.3 2007/10/23 19:47:28 chtsanti Exp $ + * $Id: AsyncJob.h,v 1.3.14.4 2007/10/25 16:41:21 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -90,7 +90,7 @@ AsyncJob(const char *aTypeName); virtual ~AsyncJob(); - virtual void *toCbdata() {assert(false); return this;} + virtual void *toCbdata() = 0; void noteStart(); // calls virtual start static void noteStartWrapper(void *data); Index: squid3/src/ICAP/ICAPInitiator.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPInitiator.h,v retrieving revision 1.3.22.1 retrieving revision 1.3.22.2 diff -u -r1.3.22.1 -r1.3.22.2 --- squid3/src/ICAP/ICAPInitiator.h 23 Oct 2007 22:42:04 -0000 1.3.22.1 +++ squid3/src/ICAP/ICAPInitiator.h 25 Oct 2007 16:41:21 -0000 1.3.22.2 @@ -1,6 +1,6 @@ /* - * $Id: ICAPInitiator.h,v 1.3.22.1 2007/10/23 22:42:04 chtsanti Exp $ + * $Id: ICAPInitiator.h,v 1.3.22.2 2007/10/25 16:41:21 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -61,9 +61,6 @@ // the final parameter is set to disable bypass or retries virtual void noteIcapQueryAbort(bool final) = 0; - // a temporary cbdata-for-multiple inheritance hack, see ICAPInitiator.cc - virtual void *toCbdata() { return this; } - protected: ICAPInitiate *initiateIcap(ICAPInitiate *x); // locks and returns x Index: squid3/src/ICAP/ICAPLauncher.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPLauncher.h,v retrieving revision 1.2 retrieving revision 1.2.30.1 diff -u -r1.2 -r1.2.30.1 --- squid3/src/ICAP/ICAPLauncher.h 8 May 2007 16:51:27 -0000 1.2 +++ squid3/src/ICAP/ICAPLauncher.h 25 Oct 2007 16:41:21 -0000 1.2.30.1 @@ -1,6 +1,6 @@ /* - * $Id: ICAPLauncher.h,v 1.2 2007/05/08 16:51:27 squidadm Exp $ + * $Id: ICAPLauncher.h,v 1.2.30.1 2007/10/25 16:41:21 chtsanti Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -75,9 +75,6 @@ virtual void noteIcapAnswer(HttpMsg *message); virtual void noteIcapQueryAbort(bool final); - // a temporary cbdata-for-multiple inheritance hack, see ICAPInitiator.cc - virtual void *toCbdata() { return this; } - protected: // ICAPInitiate API implementation virtual void start();