--------------------- PatchSet 5962 Date: 2003/09/25 16:24:39 Author: dwsquid Branch: icap-2_5 Tag: (none) Log: The storeAbort() call from icapStateFree() is necessary (e.g., in the event of ECONNRESET) and seems to work okay now. Members: src/icap_common.c:1.1.2.7->1.1.2.8 Index: squid/src/icap_common.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/icap_common.c,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- squid/src/icap_common.c 25 Sep 2003 08:29:43 -0000 1.1.2.7 +++ squid/src/icap_common.c 25 Sep 2003 16:24:39 -0000 1.1.2.8 @@ -1,5 +1,5 @@ /* - * $Id: icap_common.c,v 1.1.2.7 2003/09/25 08:29:43 rhorstmann Exp $ + * $Id: icap_common.c,v 1.1.2.8 2003/09/25 16:24:39 dwsquid Exp $ * * DEBUG: section 81 Internet Content Adaptation Protocol (ICAP) Client * AUTHOR: Geetha Manjunath, Hewlett Packard Company @@ -186,13 +186,14 @@ debug(81, 3) ("icapStateFree: FD %d, icap %p\n", fd, icap); assert(icap); assert(-1 == fd || fd == icap->icap_fd); -#if 0 - if (icap->entry->store_status != STORE_OK) { - debug(81, 1) ("icapStateFree: calling storeAbort\n"); - storeAbort(icap->entry); - } -#endif if (icap->respmod.entry) { + /* + * If we got some error on this side (like ECONNRESET) + * we must signal the other side(s) with a storeAbort() + * call. + */ + if (icap->respmod.entry->store_status != STORE_OK) + storeAbort(icap->respmod.entry); storeUnlockObject(icap->respmod.entry); icap->respmod.entry = NULL; }