From: wessels <> Date: Sat, 25 Oct 1997 22:45:00 +0000 (+0000) Subject: Increment offset before file_write() call so the callback doesn't get X-Git-Tag: SQUID_3_0_PRE1~4692 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=520452b67563764fa631c60e35331cd12085ba6b;p=thirdparty%2Fsquid.git Increment offset before file_write() call so the callback doesn't get called immediately and the data queued twice. (Michael O'Reilly). --- diff --git a/src/store.cc b/src/store.cc index ee14cede7e..060247358d 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.311 1997/10/24 04:41:56 wessels Exp $ + * $Id: store.cc,v 1.312 1997/10/25 16:45:00 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -1013,13 +1013,13 @@ storeCheckSwapOut(StoreEntry * e) assert(swap_buf_len > 0); debug(20, 3) ("storeCheckSwapOut: swapping out %d bytes from %d\n", swap_buf_len, mem->swapout.queue_offset); + mem->swapout.queue_offset += swap_buf_len; x = file_write(mem->swapout.fd, swap_buf, swap_buf_len, storeSwapOutHandle, e, put_free_8k_page); - mem->swapout.queue_offset += swap_buf_len; assert(x == DISK_OK); }