--------------------- PatchSet 6514 Date: 2005/03/17 23:58:55 Author: hno Branch: lfs-2_5 Tag: (none) Log: Fix race window when original client disconnects until the object is found not cacheable. Under these conditions use the highest disk reader offset as the lowest mem reader offset. Members: src/store_client.c:1.9.6.2.16.6->1.9.6.2.16.7 Index: squid/src/store_client.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v retrieving revision 1.9.6.2.16.6 retrieving revision 1.9.6.2.16.7 diff -u -r1.9.6.2.16.6 -r1.9.6.2.16.7 --- squid/src/store_client.c 12 Mar 2005 01:32:10 -0000 1.9.6.2.16.6 +++ squid/src/store_client.c 17 Mar 2005 23:58:55 -0000 1.9.6.2.16.7 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.9.6.2.16.6 2005/03/12 01:32:10 hno Exp $ + * $Id: store_client.c,v 1.9.6.2.16.7 2005/03/17 23:58:55 hno Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -543,6 +543,7 @@ { const MemObject *mem = entry->mem_obj; squid_off_t lowest = mem->inmem_hi + 1; + squid_off_t highest = -1; store_client *sc; dlink_node *nx = NULL; dlink_node *node; @@ -552,11 +553,15 @@ nx = node->next; if (sc->callback_data == NULL) /* open slot */ continue; + if (sc->copy_offset > highest) + highest = sc->copy_offset; if (mem->swapout.sio != NULL && sc->type != STORE_MEM_CLIENT) continue; if (sc->copy_offset < lowest) lowest = sc->copy_offset; } + if (highest < lowest && highest >= 0) + return highest; return lowest; }