From: wessels <> Date: Sat, 18 Oct 1997 05:31:10 +0000 (+0000) Subject: - Need to use clientCacheHit() for icpHandleIMSReply() as well. This X-Git-Tag: SQUID_3_0_PRE1~4775 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8479da9f53cf6601976118e8d5fca0d1305a748;p=thirdparty%2Fsquid.git - Need to use clientCacheHit() for icpHandleIMSReply() as well. This means making it global. icpHandleIMSReply() might think it is serving a cache hit, but the swapfile might not be validated yet, so swapin might fail. --- diff --git a/src/client_side.cc b/src/client_side.cc index 0653a03538..4811c21a74 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.127 1997/10/17 00:00:32 wessels Exp $ + * $Id: client_side.cc,v 1.128 1997/10/17 23:31:10 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -277,20 +277,17 @@ icpHandleIMSReply(void *data, char *buf, ssize_t size) } storeUnregister(http->old_entry, http); storeUnlockObject(http->old_entry); -#if DONT_USE_VM - file_close(http->swapin_fd); - http->swapin_fd = storeOpenSwapFileRead(entry); - if (http->swapin_fd < 0) - fatal_dump("icpHandleIMSReply: storeOpenSwapFileRead() failed\n"); -#endif } http->old_entry = NULL; /* done with old_entry */ + /* use clientCacheHit() here as the callback because we might + be swapping in from disk, and the file might not really be + there */ storeClientCopy(entry, http->out.offset, http->out.offset, 4096, get_free_4k_page(), - icpSendMoreData, + clientCacheHit, http); }