--------------------- PatchSet 6245 Date: 2007/12/05 04:44:09 Author: rousskov Branch: async-calls Tag: (none) Log: Removed ICAPModXact_noteServiceReady wrapper. Use job calls instead. Removed unused code. Members: src/ICAP/ICAPModXact.cc:1.31.4.2->1.31.4.3 Index: squid3/src/ICAP/ICAPModXact.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ICAP/ICAPModXact.cc,v retrieving revision 1.31.4.2 retrieving revision 1.31.4.3 diff -u -r1.31.4.2 -r1.31.4.3 --- squid3/src/ICAP/ICAPModXact.cc 21 Nov 2007 21:59:39 -0000 1.31.4.2 +++ squid3/src/ICAP/ICAPModXact.cc 5 Dec 2007 04:44:09 -0000 1.31.4.3 @@ -84,14 +84,7 @@ // XXX: If commConnectStart in startWriting fails, we may get here //_after_ the object got destroyed. Somebody please fix commConnectStart! // TODO: Does re-entrance protection in callStart() solve the above? -} - -static -void ICAPModXact_noteServiceReady(void *data, ICAPServiceRep::Pointer &) -{ - ICAPModXact *x = static_cast(data); - assert(x); - x->noteServiceReady(); + // TODO: Check that comm using AsyncCalls solves this problem. } void ICAPModXact::waitForService() @@ -99,13 +92,13 @@ Must(!state.serviceWaiting); debugs(93, 7, "ICAPModXact will wait for the ICAP service" << status()); state.serviceWaiting = true; - service().callWhenReady(&ICAPModXact_noteServiceReady, this); + AsyncCall *call = asyncCall(93,5, "ICAPModXact::noteServiceReady", + MemFun(this, &ICAPModXact::noteServiceReady)); + service().callWhenReady(call); } void ICAPModXact::noteServiceReady() { - ICAPXaction_Enter(noteServiceReady); - Must(state.serviceWaiting); state.serviceWaiting = false; @@ -115,8 +108,6 @@ disableRetries(); throw TexcHere("ICAP service is unusable"); } - - ICAPXaction_Exit(); } void ICAPModXact::startWriting()