From 698a99c2c615879c81552bad47d6c536ed40f3a2 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 19 Sep 1998 22:39:15 +0000 Subject: [PATCH] assertions to trap some apparent bugs earlier than they are now being caught --- src/store_client.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/store_client.cc b/src/store_client.cc index f361d26b6d..f4261ac4a1 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.41 1998/09/14 21:28:13 wessels Exp $ + * $Id: store_client.cc,v 1.42 1998/09/19 16:39:15 wessels Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -91,10 +91,16 @@ storeClientListAdd(StoreEntry * e, void *data) sc->swapin_fd = -1; sc->flags.disk_io_pending = 0; sc->entry = e; - if (e->store_status == STORE_PENDING && mem->swapout.fd == -1) + if (e->store_status == STORE_PENDING && mem->swapout.fd == -1) { sc->type = STORE_MEM_CLIENT; - else + /* assert we'll be able to get the data we want */ + assert(mem->inmem_lo == 0); + } else { sc->type = STORE_DISK_CLIENT; + /* assert we'll be able to get the data we want */ + /* maybe we should open swapin_fd here */ + assert(e->swap_file_number > -1); + } for (T = &mem->clients; *T; T = &(*T)->next); *T = sc; } -- 2.47.3