--------------------- PatchSet 968 Date: 2000/12/20 12:41:21 Author: adri Branch: modio Tag: (none) Log: rename storeClientListAdd() and storeUnregister() to storeClientRegister() and storeClientUnregister() .. this seems a little more consistent to me.. Members: src/asn.c:1.2.2.5->1.2.2.6 src/client_side.c:1.2.2.6->1.2.2.7 src/net_db.c:1.2.2.3->1.2.2.4 src/peer_digest.c:1.2.2.1->1.2.2.2 src/protos.h:1.2.2.6->1.2.2.7 src/pump.c:1.2.2.3->1.2.2.4 src/store_client.c:1.2.2.7->1.2.2.8 src/urn.c:1.2.2.3->1.2.2.4 Index: squid/src/asn.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/asn.c,v retrieving revision 1.2.2.5 retrieving revision 1.2.2.6 diff -u -r1.2.2.5 -r1.2.2.6 --- squid/src/asn.c 20 Dec 2000 11:48:41 -0000 1.2.2.5 +++ squid/src/asn.c 20 Dec 2000 12:41:21 -0000 1.2.2.6 @@ -1,6 +1,6 @@ /* - * $Id: asn.c,v 1.2.2.5 2000/12/20 11:48:41 adri Exp $ + * $Id: asn.c,v 1.2.2.6 2000/12/20 12:41:21 adri Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -197,11 +197,11 @@ asState->request = requestLink(req); if ((e = storeGetPublic(asres, METHOD_GET)) == NULL) { e = storeCreateEntry(asres, asres, null_request_flags, METHOD_GET); - storeClientListAdd(e, asState); + storeClientRegister(e, asState); fwdStart(-1, e, asState->request); } else { storeLockObject(e); - storeClientListAdd(e, asState); + storeClientRegister(e, asState); } asState->entry = e; asState->seen = 0; @@ -295,7 +295,7 @@ { ASState *asState = data; debug(53, 3) ("asnStateFree: %s\n", storeUrl(asState->entry)); - storeUnregister(asState->entry, asState); + storeClientUnregister(asState->entry, asState); storeUnlockObject(asState->entry); requestUnlink(asState->request); cbdataFree(asState); Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -r1.2.2.6 -r1.2.2.7 --- squid/src/client_side.c 20 Dec 2000 11:48:41 -0000 1.2.2.6 +++ squid/src/client_side.c 20 Dec 2000 12:41:21 -0000 1.2.2.7 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.2.2.6 2000/12/20 11:48:41 adri Exp $ + * $Id: client_side.c,v 1.2.2.7 2000/12/20 12:41:21 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -201,7 +201,7 @@ e = storeCreateEntry(h->uri, h->log_uri, flags, m); /* XXX just for testing! */ reply_internal_create(e); - storeClientListAdd(e, h); + storeClientRegister(e, h); #if DELAY_POOLS delaySetStoreClient(h->sc, delayClient(h->request)); #endif @@ -375,7 +375,7 @@ http->request->flags, http->request->method); /* NOTE, don't call storeLockObject(), storeCreateEntry() does it */ - storeClientListAdd(entry, http); + storeClientRegister(entry, http); #if DELAY_POOLS /* delay_id is already set on original store client */ delaySetStoreClient(http->sc, delayClient(http->request)); @@ -462,7 +462,7 @@ /* We have an existing entry, but failed to validate it */ /* Its okay to send the old one anyway */ http->log_type = LOG_TCP_REFRESH_FAIL_HIT; - storeUnregister(entry, http); + storeClientUnregister(entry, http); storeUnlockObject(entry); entry = http->entry = http->old_entry; } else if (STORE_PENDING == entry->store_status && 0 == status) { @@ -472,7 +472,7 @@ debug(33, 3) ("clientHandleIMSReply: Reply is too large '%s', using old entry\n", url); /* use old entry, this repeats the code abovez */ http->log_type = LOG_TCP_REFRESH_FAIL_HIT; - storeUnregister(entry, http); + storeClientUnregister(entry, http); storeUnlockObject(entry); entry = http->entry = http->old_entry; /* continue */ @@ -502,7 +502,7 @@ * not the body they refer to. */ httpReplyUpdateOnNotModified(oldentry->mem_obj->reply, mem->reply); storeTimestampsSet(oldentry); - storeUnregister(entry, http); + storeClientUnregister(entry, http); storeUnlockObject(entry); entry = http->entry = oldentry; entry->timestamp = squid_curtime; @@ -519,7 +519,7 @@ storeTimestampsSet(http->old_entry); http->log_type = LOG_TCP_REFRESH_HIT; } - storeUnregister(http->old_entry, http); + storeClientUnregister(http->old_entry, http); storeUnlockObject(http->old_entry); recopy = 0; } @@ -708,7 +708,7 @@ */ if ((e = http->entry)) { http->entry = NULL; - storeUnregister(e, http); + storeClientUnregister(e, http); storeUnlockObject(e); } #endif @@ -763,14 +763,14 @@ stringClean(&http->range_iter.boundary); if ((e = http->entry)) { http->entry = NULL; - storeUnregister(e, http); + storeClientUnregister(e, http); storeUnlockObject(e); } /* old_entry might still be set if we didn't yet get the reply * code in clientHandleIMSReply() */ if ((e = http->old_entry)) { http->old_entry = NULL; - storeUnregister(e, http); + storeClientUnregister(e, http); storeUnlockObject(e); } requestUnlink(http->request); @@ -1347,7 +1347,7 @@ http->log_type = LOG_TCP_SWAPFAIL_MISS; if ((e = http->entry)) { http->entry = NULL; - storeUnregister(e, http); + storeClientUnregister(e, http); storeUnlockObject(e); } clientProcessMiss(http); @@ -1456,7 +1456,7 @@ MemBuf mb = httpPacked304Reply(e->mem_obj->reply); http->log_type = LOG_TCP_IMS_HIT; memFree(buf, MEM_CLIENT_SOCK_BUF); - storeUnregister(e, http); + storeClientUnregister(e, http); storeUnlockObject(e); e = clientCreateStoreEntry(http, http->request->method, null_request_flags); /* @@ -1726,7 +1726,7 @@ if (rep && clientReplyBodyTooLarge(rep->content_length)) { ErrorState *err = errorCon(ERR_TOO_BIG, HTTP_FORBIDDEN); err->request = requestLink(http->request); - storeUnregister(http->entry, http); + storeClientUnregister(http->entry, http); storeUnlockObject(http->entry); http->entry = clientCreateStoreEntry(http, http->request->method, null_request_flags); @@ -1961,7 +1961,7 @@ err->request = requestLink(r); err->src_addr = http->conn->peer.sin_addr; if (http->entry) { - storeUnregister(http->entry, http); + storeClientUnregister(http->entry, http); storeUnlockObject(http->entry); } http->entry = clientCreateStoreEntry(http, r->method, null_request_flags); @@ -2141,7 +2141,7 @@ storeLockObject(http->entry); storeCreateMemObject(http->entry, http->uri, http->log_uri); http->entry->mem_obj->method = r->method; - storeClientListAdd(http->entry, http); + storeClientRegister(http->entry, http); #if DELAY_POOLS delaySetStoreClient(http->sc, delayClient(r)); #endif @@ -2179,7 +2179,7 @@ debug(33, 0) ("\tlog_type = %s\n", log_tags[http->log_type]); storeEntryDump(http->entry, 1); } - storeUnregister(http->entry, http); + storeClientUnregister(http->entry, http); storeUnlockObject(http->entry); http->entry = NULL; } Index: squid/src/net_db.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/net_db.c,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -u -r1.2.2.3 -r1.2.2.4 --- squid/src/net_db.c 13 Dec 2000 09:45:02 -0000 1.2.2.3 +++ squid/src/net_db.c 20 Dec 2000 12:41:22 -0000 1.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: net_db.c,v 1.2.2.3 2000/12/13 09:45:02 rbcollins Exp $ + * $Id: net_db.c,v 1.2.2.4 2000/12/20 12:41:22 adri Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels @@ -644,7 +644,7 @@ debug(38, 3) ("netdbExchangeDone: %s\n", storeUrl(ex->e)); memFree(ex->buf, MEM_4K_BUF); requestUnlink(ex->r); - storeUnregister(ex->sc, ex->e, ex); + storeClientUnregister(ex->sc, ex->e, ex); storeUnlockObject(ex->e); cbdataUnlock(ex->p); cbdataFree(ex); @@ -1005,7 +1005,7 @@ ex->buf_sz = 4096; ex->buf = memAllocate(MEM_4K_BUF); assert(NULL != ex->e); - ex->sc = storeClientListAdd(ex->e, ex); + ex->sc = storeClientRegister(ex->e, ex); storeClientCopy(ex->sc, ex->e, ex->seen, ex->used, ex->buf_sz, ex->buf, netdbExchangeHandleReply, ex); ex->r->flags.loopdetect = 1; /* cheat! -- force direct */ Index: squid/src/peer_digest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/peer_digest.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- squid/src/peer_digest.c 13 Dec 2000 09:45:02 -0000 1.2.2.1 +++ squid/src/peer_digest.c 20 Dec 2000 12:41:22 -0000 1.2.2.2 @@ -1,6 +1,6 @@ /* - * $Id: peer_digest.c,v 1.2.2.1 2000/12/13 09:45:02 rbcollins Exp $ + * $Id: peer_digest.c,v 1.2.2.2 2000/12/20 12:41:22 adri Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov @@ -312,11 +312,11 @@ debug(72, 5) ("peerDigestRequest: found old entry\n"); storeLockObject(old_e); storeCreateMemObject(old_e, url, url); - fetch->old_sc = storeClientListAdd(old_e, fetch); + fetch->old_sc = storeClientRegister(old_e, fetch); } e = fetch->entry = storeCreateEntry(url, url, req->flags, req->method); assert(EBIT_TEST(e->flags, KEY_PRIVATE)); - fetch->sc = storeClientListAdd(e, fetch); + fetch->sc = storeClientRegister(e, fetch); /* set lastmod to trigger IMS request if possible */ if (old_e) e->lastmod = old_e->lastmod; @@ -365,7 +365,7 @@ httpReplyUpdateOnNotModified(fetch->old_entry->mem_obj->reply, reply); storeTimestampsSet(fetch->old_entry); /* get rid of 304 reply */ - storeUnregister(fetch->sc, fetch->entry, fetch); + storeClientUnregister(fetch->sc, fetch->entry, fetch); storeUnlockObject(fetch->entry); fetch->entry = fetch->old_entry; fetch->old_entry = NULL; @@ -376,7 +376,7 @@ /* get rid of old entry if any */ if (fetch->old_entry) { debug(72, 3) ("peerDigestFetchReply: got new digest, releasing old one\n"); - storeUnregister(fetch->old_sc, fetch->old_entry, fetch); + storeClientUnregister(fetch->old_sc, fetch->old_entry, fetch); storeReleaseRequest(fetch->old_entry); storeUnlockObject(fetch->old_entry); fetch->old_entry = NULL; @@ -684,7 +684,7 @@ if (fetch->old_entry) { debug(72, 2) ("peerDigestFetchFinish: deleting old entry\n"); - storeUnregister(fetch->sc, fetch->old_entry, fetch); + storeClientUnregister(fetch->sc, fetch->old_entry, fetch); storeReleaseRequest(fetch->old_entry); storeUnlockObject(fetch->old_entry); fetch->old_entry = NULL; @@ -696,7 +696,7 @@ statCounter.cd.msgs_recv += fetch->recv.msg; /* unlock everything */ - storeUnregister(fetch->sc, fetch->entry, fetch); + storeClientUnregister(fetch->sc, fetch->entry, fetch); storeUnlockObject(fetch->entry); requestUnlink(fetch->request); fetch->entry = NULL; Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.2.2.6 retrieving revision 1.2.2.7 diff -u -r1.2.2.6 -r1.2.2.7 --- squid/src/protos.h 20 Dec 2000 11:48:41 -0000 1.2.2.6 +++ squid/src/protos.h 20 Dec 2000 12:41:22 -0000 1.2.2.7 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.2.2.6 2000/12/20 11:48:41 adri Exp $ + * $Id: protos.h,v 1.2.2.7 2000/12/20 12:41:22 adri Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -976,10 +976,10 @@ #if STORE_CLIENT_LIST_DEBUG extern store_client *storeClientListSearch(const MemObject * mem, void *data); #endif -extern void storeClientListAdd(StoreEntry * e, void *data); +extern void storeClientRegister(StoreEntry * e, void *data); extern void storeClientCopy(StoreEntry *, off_t, off_t, size_t, char *, STCB *, void *); extern int storeClientCopyPending(StoreEntry * e, void *data); -extern int storeUnregister(StoreEntry * e, void *data); +extern int storeClientUnregister(StoreEntry * e, void *data); extern off_t storeLowestMemReaderOffset(const StoreEntry * entry); extern void InvokeHandlers(StoreEntry * e); extern int storePendingNClients(const StoreEntry * e); Index: squid/src/pump.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.c,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -u -r1.2.2.3 -r1.2.2.4 --- squid/src/pump.c 20 Dec 2000 11:48:41 -0000 1.2.2.3 +++ squid/src/pump.c 20 Dec 2000 12:41:22 -0000 1.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: pump.c,v 1.2.2.3 2000/12/20 11:48:41 adri Exp $ + * $Id: pump.c,v 1.2.2.4 2000/12/20 12:41:22 adri Exp $ * * DEBUG: section 61 PUMP handler * AUTHOR: Kostas Anagnostakis @@ -72,7 +72,7 @@ snprintf(new_key, MAX_URL + 5, "%s|Pump", uri); cbdataAdd(p, memFree, MEM_PUMP_STATE_DATA); p->request_entry = storeCreateEntry(new_key, new_key, flags, r->method); - storeClientListAdd(p->request_entry, p); + storeClientRegister(p->request_entry, p); EBIT_SET(p->request_entry->flags, ENTRY_DONT_LOG); #if DELAY_POOLS delaySetStoreClient(p->sc, delayClient(r)); @@ -307,7 +307,7 @@ assert(!p->flags.closing); p->flags.closing = 1; if (req != NULL && req->store_status == STORE_PENDING) { - storeUnregister(req, p); + storeClientUnregister(req, p); } if (rep != NULL && rep->store_status == STORE_PENDING) { ErrorState *err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR); @@ -347,7 +347,7 @@ req = p->request_entry; rep = p->reply_entry; if (req != NULL) { - storeUnregister(req, p); + storeClientUnregister(req, p); storeUnlockObject(req); p->request_entry = NULL; } Index: squid/src/store_client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v retrieving revision 1.2.2.7 retrieving revision 1.2.2.8 diff -u -r1.2.2.7 -r1.2.2.8 --- squid/src/store_client.c 20 Dec 2000 11:48:41 -0000 1.2.2.7 +++ squid/src/store_client.c 20 Dec 2000 12:41:22 -0000 1.2.2.8 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.2.2.7 2000/12/20 11:48:41 adri Exp $ + * $Id: store_client.c,v 1.2.2.8 2000/12/20 12:41:22 adri Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -61,7 +61,7 @@ /* add client with fd to client list */ void -storeClientListAdd(StoreEntry * e, void *data) +storeClientRegister(StoreEntry * e, void *data) { e->refcount++; @@ -292,7 +292,7 @@ * Disassociate a client from a storeentry */ int -storeUnregister(StoreEntry * e, void *data) +storeClientUnregister(StoreEntry * e, void *data) { store_client *sc = &e->sc; MemObject *mem = e->mem_obj; Index: squid/src/urn.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/urn.c,v retrieving revision 1.2.2.3 retrieving revision 1.2.2.4 diff -u -r1.2.2.3 -r1.2.2.4 --- squid/src/urn.c 20 Dec 2000 11:48:42 -0000 1.2.2.3 +++ squid/src/urn.c 20 Dec 2000 12:41:22 -0000 1.2.2.4 @@ -1,6 +1,6 @@ /* - * $Id: urn.c,v 1.2.2.3 2000/12/20 11:48:42 adri Exp $ + * $Id: urn.c,v 1.2.2.4 2000/12/20 12:41:22 adri Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis @@ -137,11 +137,11 @@ httpHeaderPutStr(&urlres_r->header, HDR_ACCEPT, "text/plain"); if ((urlres_e = storeGetPublic(urlres, METHOD_GET)) == NULL) { urlres_e = storeCreateEntry(urlres, urlres, null_request_flags, METHOD_GET); - storeClientListAdd(urlres_e, urnState); + storeClientRegister(urlres_e, urnState); fwdStart(-1, urlres_e, urlres_r); } else { storeLockObject(urlres_e); - storeClientListAdd(urlres_e, urnState); + storeClientRegister(urlres_e, urnState); } urnState->urlres_e = urlres_e; urnState->urlres_r = requestLink(urlres_r); @@ -291,7 +291,7 @@ } safe_free(urls); /* mb was absorbed in httpBodySet call, so we must not clean it */ - storeUnregister(urlres_e, urnState); + storeClientUnregister(urlres_e, urnState); storeUnlockObject(urlres_e); storeUnlockObject(urnState->entry); requestUnlink(urnState->request);