--------------------- PatchSet 10173 Date: 2007/11/27 12:16:58 Author: adri Branch: store_copy Tag: (none) Log: Convert the async refresh code over to use storeClientRef() rather than storeClientCopy(). Members: src/client_side.c:1.202.2.8->1.202.2.9 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.202.2.8 retrieving revision 1.202.2.9 diff -u -r1.202.2.8 -r1.202.2.9 --- squid/src/client_side.c 27 Nov 2007 12:09:21 -0000 1.202.2.8 +++ squid/src/client_side.c 27 Nov 2007 12:16:58 -0000 1.202.2.9 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.202.2.8 2007/11/27 12:09:21 adri Exp $ + * $Id: client_side.c,v 1.202.2.9 2007/11/27 12:16:58 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2008,7 +2008,6 @@ store_client *sc; squid_off_t offset; size_t buf_in_use; - char readbuf[STORE_CLIENT_BUF_SZ]; struct timeval start; } clientAsyncRefreshRequest; @@ -2081,10 +2080,11 @@ } static void -clientHandleAsyncReply(void *data, char *buf, ssize_t size) +clientHandleAsyncReply(void *data, mem_node_ref nr, ssize_t size) { clientAsyncRefreshRequest *async = data; StoreEntry *e = async->entry; + stmemNodeUnref(&nr); if (EBIT_TEST(e->flags, ENTRY_ABORTED)) { clientAsyncDone(async); return; @@ -2098,10 +2098,10 @@ clientAsyncDone(async); return; } - storeClientCopy(async->sc, async->entry, + storeClientRef(async->sc, async->entry, async->offset, async->offset, - STORE_CLIENT_BUF_SZ, async->readbuf, + SM_PAGE_SIZE, clientHandleAsyncReply, async); } @@ -2147,10 +2147,10 @@ delaySetStoreClient(async->sc, delayClient(http)); #endif fwdStart(-1, async->entry, async->request); - storeClientCopy(async->sc, async->entry, + storeClientRef(async->sc, async->entry, async->offset, async->offset, - STORE_CLIENT_BUF_SZ, async->readbuf, + SM_PAGE_SIZE, clientHandleAsyncReply, async); }