--------------------- PatchSet 1348 Date: 2001/01/18 20:24:51 Author: hno Branch: vary-2_3 Tag: (none) Log: Adopted to Squid-2.3 ways of things Members: src/client_side.c:1.1.1.3.4.6.4.1->1.1.1.3.4.6.4.2 src/store.c:1.1.1.3.4.5.4.1->1.1.1.3.4.5.4.2 src/store_key_md5.c:1.1.1.3.4.1.6.1->1.1.1.3.4.1.6.2 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3.4.6.4.1 retrieving revision 1.1.1.3.4.6.4.2 diff -u -r1.1.1.3.4.6.4.1 -r1.1.1.3.4.6.4.2 --- squid/src/client_side.c 18 Jan 2001 20:12:42 -0000 1.1.1.3.4.6.4.1 +++ squid/src/client_side.c 18 Jan 2001 20:24:51 -0000 1.1.1.3.4.6.4.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3.4.6.4.1 2001/01/18 20:12:42 hno Exp $ + * $Id: client_side.c,v 1.1.1.3.4.6.4.2 2001/01/18 20:24:51 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -534,7 +534,7 @@ ErrorState *err = NULL; HttpReply *r; http_status status = HTTP_NOT_FOUND; - http_version_t version; + debug(33, 3) ("Config2.onoff.enable_purge = %d\n", Config2.onoff.enable_purge); if (!Config2.onoff.enable_purge) { http->log_type = LOG_TCP_DENIED; @@ -560,9 +560,9 @@ storeLockObject(http->entry); storeCreateMemObject(http->entry, http->uri, http->log_uri); http->entry->mem_obj->method = http->request->method; - http->sc = storeClientListAdd(http->entry, http); + storeClientListAdd(http->entry, http); http->log_type = LOG_TCP_HIT; - storeClientCopy(http->sc, http->entry, + storeClientCopy(http->entry, http->out.offset, http->out.offset, CLIENT_SOCK_SZ, @@ -1381,8 +1381,7 @@ */ memFree(buf, MEM_CLIENT_SOCK_BUF); http->entry = NULL; - storeUnregister(http->sc, e, http); - http->sc = NULL; + storeUnregister(e, http); storeUnlockObject(e); /* Note: varyEvalyateMatch updates the request with vary information * so we only get here once. (it also takes care of cancelling loops) @@ -1400,8 +1399,7 @@ if (r->method == METHOD_PURGE) { memFree(buf, MEM_CLIENT_SOCK_BUF); http->entry = NULL; - storeUnregister(http->sc, e, http); - http->sc = NULL; + storeUnregister(e, http); storeUnlockObject(e); clientPurgeRequest(http); return; Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.1.1.3.4.5.4.1 retrieving revision 1.1.1.3.4.5.4.2 diff -u -r1.1.1.3.4.5.4.1 -r1.1.1.3.4.5.4.2 --- squid/src/store.c 18 Jan 2001 20:12:43 -0000 1.1.1.3.4.5.4.1 +++ squid/src/store.c 18 Jan 2001 20:24:51 -0000 1.1.1.3.4.5.4.2 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.1.1.3.4.5.4.1 2001/01/18 20:12:43 hno Exp $ + * $Id: store.c,v 1.1.1.3.4.5.4.2 2001/01/18 20:24:51 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -420,11 +420,9 @@ } if (mem->vary_headers && !storeGetPublic(mem->url, mem->method)) { /* Create "vary" base object */ - http_version_t version; String vary; pe = storeCreateEntry(mem->url, mem->log_url, request->flags, request->method); - httpBuildVersion(&version, 1, 0); - httpReplySetHeaders(pe->mem_obj->reply, version, HTTP_OK, "Internal marker object", "x-squid-internal/vary", -1, -1, squid_curtime + 100000); + httpReplySetHeaders(pe->mem_obj->reply, 1.0, HTTP_OK, "Internal marker object", "x-squid-internal/vary", -1, -1, squid_curtime + 100000); vary = httpHeaderGetList(&mem->reply->header, HDR_VARY); httpHeaderPutStr(&pe->mem_obj->reply->header, HDR_VARY, strBuf(vary)); stringClean(&vary); Index: squid/src/store_key_md5.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_key_md5.c,v retrieving revision 1.1.1.3.4.1.6.1 retrieving revision 1.1.1.3.4.1.6.2 diff -u -r1.1.1.3.4.1.6.1 -r1.1.1.3.4.1.6.2 --- squid/src/store_key_md5.c 18 Jan 2001 20:12:43 -0000 1.1.1.3.4.1.6.1 +++ squid/src/store_key_md5.c 18 Jan 2001 20:24:51 -0000 1.1.1.3.4.1.6.2 @@ -1,6 +1,6 @@ /* - * $Id: store_key_md5.c,v 1.1.1.3.4.1.6.1 2001/01/18 20:12:43 hno Exp $ + * $Id: store_key_md5.c,v 1.1.1.3.4.1.6.2 2001/01/18 20:24:51 hno Exp $ * * DEBUG: section 20 Storage Manager MD5 Cache Keys * AUTHOR: Duane Wessels @@ -142,7 +142,7 @@ return digest; } -cache_key * +const cache_key * storeKeyDup(const cache_key * key) { cache_key *dup = memAllocate(MEM_MD5_DIGEST);