]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
- Need to use clientCacheHit() for icpHandleIMSReply() as well. This
authorwessels <>
Sat, 18 Oct 1997 05:31:10 +0000 (05:31 +0000)
committerwessels <>
Sat, 18 Oct 1997 05:31:10 +0000 (05:31 +0000)
  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.

src/client_side.cc

index 0653a035389bbbf40adb47ff9cf3fb81ccca7c1b..4811c21a74fd10c533425d9f27baaa51b79a5c25 100644 (file)
@@ -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);
 }