From: wessels <> Date: Wed, 31 May 2006 23:24:23 +0000 (+0000) Subject: minor: now that we're passing StoreIOState to these callbacks again, X-Git-Tag: SQUID_3_0_PRE4~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8417744435a407b36219e81549c9e4fb6baa22d3;p=thirdparty%2Fsquid.git minor: now that we're passing StoreIOState to these callbacks again, we can replace the assertion that "mem->swapout.sio == sio". --- diff --git a/src/store_swapout.cc b/src/store_swapout.cc index 6d205ba65b..10494b99dd 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.106 2006/05/23 00:30:21 wessels Exp $ + * $Id: store_swapout.cc,v 1.107 2006/05/31 17:24:23 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -107,7 +107,7 @@ storeSwapOutFileNotify(void *data, int errflag, StoreIOState::Pointer self) MemObject *mem = e->mem_obj; assert(e->swap_status == SWAPOUT_WRITING); assert(mem); - assert(mem->swapout.sio != NULL); + assert(mem->swapout.sio == self); assert(errflag == 0); e->swap_filen = mem->swapout.sio->swap_filen; e->swap_dirn = mem->swapout.sio->swap_dirn; @@ -155,7 +155,11 @@ doPages(StoreEntry *anEntry) mem->swapout.queue_offset += swap_buf_len; - storeIOWrite(mem->swapout.sio, mem->data_hdr.NodeGet(mem->swapout.memnode), swap_buf_len, -1, memNodeWriteComplete); + storeIOWrite(mem->swapout.sio, + mem->data_hdr.NodeGet(mem->swapout.memnode), + swap_buf_len, + -1, + memNodeWriteComplete); /* the storeWrite() call might generate an error */ if (anEntry->swap_status != SWAPOUT_WRITING) @@ -321,6 +325,7 @@ storeSwapOutFileClosed(void *data, int errflag, StoreIOState::Pointer self) generic_cbdata *c = (generic_cbdata *)data; StoreEntry *e = (StoreEntry *)c->data; MemObject *mem = e->mem_obj; + assert(mem->swapout.sio == self); assert(e->swap_status == SWAPOUT_WRITING); cbdataFree(c);