--------------------- PatchSet 5546 Date: 2002/12/09 03:53:28 Author: ymc Branch: dsa Tag: (none) Log: also take care of ENTRY_VALIDATED, ENTRY_BAD_LENGTH and ENTRY_ABORTED now all flags should be taken care in the src level Members: src/client_side.c:1.5.2.9.2.5->1.5.2.9.2.6 src/ftp.c:1.4.2.7.2.2->1.4.2.7.2.3 src/peer_digest.c:1.3.4.1->1.3.4.1.8.1 src/pump.c:1.4.4.1.10.1->1.4.4.1.10.2 src/store.c:1.4.4.5.6.11->1.4.4.5.6.12 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.5.2.9.2.5 retrieving revision 1.5.2.9.2.6 diff -u -r1.5.2.9.2.5 -r1.5.2.9.2.6 --- squid/src/client_side.c 7 Dec 2002 06:51:24 -0000 1.5.2.9.2.5 +++ squid/src/client_side.c 9 Dec 2002 03:53:28 -0000 1.5.2.9.2.6 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.5.2.9.2.5 2002/12/07 06:51:24 ymc Exp $ + * $Id: client_side.c,v 1.5.2.9.2.6 2002/12/09 03:53:28 ymc Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -420,11 +420,13 @@ http->out.offset = 0; fwdStart(http->conn->fd, http->entry, http->request); /* Register with storage manager to receive updates when data comes in. */ - if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) - debug(33, 0) ("clientProcessExpired: found ENTRY_ABORTED object\n"); #ifdef DSA + if (EBIT_TEST(entry->p->flags, ENTRY_ABORTED)) + debug(33, 0) ("clientProcessExpired: found ENTRY_ABORTED object\n"); storeClientCopy(http->sc, entry->p, #else + if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) + debug(33, 0) ("clientProcessExpired: found ENTRY_ABORTED object\n"); storeClientCopy(http->sc, entry, #endif http->out.offset, @@ -503,17 +505,23 @@ memFree(buf, MEM_CLIENT_SOCK_BUF); return; } +#ifdef DSA + if (size < 0 && !EBIT_TEST(entry->p->flags, ENTRY_ABORTED)) { +#else if (size < 0 && !EBIT_TEST(entry->flags, ENTRY_ABORTED)) { +#endif memFree(buf, MEM_CLIENT_SOCK_BUF); return; } #ifdef DSA mem = entry->p->mem_obj; + status = mem->reply->sline.status; + if (EBIT_TEST(entry->p->flags, ENTRY_ABORTED)) { #else mem = entry->mem_obj; -#endif status = mem->reply->sline.status; if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { +#endif debug(33, 3) ("clientHandleIMSReply: ABORTED '%s'\n", url); /* We have an existing entry, but failed to validate it */ /* Its okay to send the old one anyway */ @@ -631,11 +639,13 @@ } http->old_entry = NULL; /* done with old_entry */ http->old_sc = NULL; - assert(!EBIT_TEST(entry->flags, ENTRY_ABORTED)); - if (recopy) { #ifdef DSA + assert(!EBIT_TEST(entry->p->flags, ENTRY_ABORTED)); + if (recopy) { storeClientCopy(http->sc, entry->p, #else + assert(!EBIT_TEST(entry->flags, ENTRY_ABORTED)); + if (recopy) { storeClientCopy(http->sc, entry, #endif http->out.offset, @@ -1600,10 +1610,11 @@ assert(size > 0); #ifdef DSA mem = e->p->mem_obj; + assert(!EBIT_TEST(e->p->flags, ENTRY_ABORTED)); #else mem = e->mem_obj; -#endif assert(!EBIT_TEST(e->flags, ENTRY_ABORTED)); +#endif if (mem->reply->sline.status == 0) { /* * we don't have full reply headers yet; either wait for more or Index: squid/src/ftp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v retrieving revision 1.4.2.7.2.2 retrieving revision 1.4.2.7.2.3 diff -u -r1.4.2.7.2.2 -r1.4.2.7.2.3 --- squid/src/ftp.c 18 Nov 2002 05:05:58 -0000 1.4.2.7.2.2 +++ squid/src/ftp.c 9 Dec 2002 03:53:28 -0000 1.4.2.7.2.3 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.4.2.7.2.2 2002/11/18 05:05:58 ymc Exp $ + * $Id: ftp.c,v 1.4.2.7.2.3 2002/12/09 03:53:28 ymc Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1723,7 +1723,11 @@ * ftpReadControlReply() and before here, probably when * trying to write to the client. */ +#ifdef DSA + if (!EBIT_TEST(ftpState->entry->p->flags, ENTRY_ABORTED)) +#else if (!EBIT_TEST(ftpState->entry->flags, ENTRY_ABORTED)) +#endif fwdComplete(ftpState->fwd); ftpSendQuit(ftpState); return; @@ -1971,8 +1975,11 @@ FtpStateData *ftpState = data; struct sockaddr_in my_peer, me; debug(9, 3) ("ftpAcceptDataConnection\n"); - +#ifdef DSA + if (EBIT_TEST(ftpState->entry->p->flags, ENTRY_ABORTED)) { +#else if (EBIT_TEST(ftpState->entry->flags, ENTRY_ABORTED)) { +#endif comm_close(ftpState->ctrl.fd); return; } Index: squid/src/peer_digest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/peer_digest.c,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.1.8.1 diff -u -r1.3.4.1 -r1.3.4.1.8.1 --- squid/src/peer_digest.c 15 Jan 2001 22:49:19 -0000 1.3.4.1 +++ squid/src/peer_digest.c 9 Dec 2002 03:53:28 -0000 1.3.4.1.8.1 @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.c,v 1.3.4.1 2001/01/15 22:49:19 hno Exp $ + * $Id: peer_digest.c,v 1.3.4.1.8.1 2002/12/09 03:53:28 ymc Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -547,7 +547,11 @@ reason = "swap failure"; else if (!fetch->entry) reason = "swap aborted?!"; +#ifdef DSA + else if (EBIT_TEST(fetch->entry->p->flags, ENTRY_ABORTED)) +#else else if (EBIT_TEST(fetch->entry->flags, ENTRY_ABORTED)) +#endif reason = "swap aborted"; } /* continue checking (maybe-successful eof case) */ Index: squid/src/pump.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.c,v retrieving revision 1.4.4.1.10.1 retrieving revision 1.4.4.1.10.2 diff -u -r1.4.4.1.10.1 -r1.4.4.1.10.2 --- squid/src/pump.c 15 Nov 2002 09:10:36 -0000 1.4.4.1.10.1 +++ squid/src/pump.c 9 Dec 2002 03:53:28 -0000 1.4.4.1.10.2 @@ -1,6 +1,6 @@ /* - * $Id: pump.c,v 1.4.4.1.10.1 2002/11/15 09:10:36 ymc Exp $ + * $Id: pump.c,v 1.4.4.1.10.2 2002/12/09 03:53:28 ymc Exp $ * * DEBUG: section 61 PUMP handler * AUTHOR: Kostas Anagnostakis @@ -209,7 +209,11 @@ pumpClose(p); return; } +#ifdef DSA + if (EBIT_TEST(p->request_entry->p->flags, ENTRY_ABORTED)) { +#else if (EBIT_TEST(p->request_entry->flags, ENTRY_ABORTED)) { +#endif debug(61, 5) ("pumpServerCopyComplete: ENTRY_ABORTED\n"); pumpClose(p); return; Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.4.4.5.6.11 retrieving revision 1.4.4.5.6.12 diff -u -r1.4.4.5.6.11 -r1.4.4.5.6.12 --- squid/src/store.c 9 Dec 2002 01:06:50 -0000 1.4.4.5.6.11 +++ squid/src/store.c 9 Dec 2002 03:53:28 -0000 1.4.4.5.6.12 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.4.4.5.6.11 2002/12/09 01:06:50 ymc Exp $ + * $Id: store.c,v 1.4.4.5.6.12 2002/12/09 03:53:28 ymc Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -1482,7 +1482,11 @@ if (EBIT_TEST(e->flags, ENTRY_NEGCACHED)) if (e->expires <= squid_curtime) return 0; +#ifdef DSA + if (EBIT_TEST(e->p->flags, ENTRY_ABORTED)) +#else if (EBIT_TEST(e->flags, ENTRY_ABORTED)) +#endif return 0; return 1; }