From ea1a81b6f8df49918483d91781f2791edf95a523 Mon Sep 17 00:00:00 2001 From: forsyth Date: Tue, 28 Jul 2009 21:13:46 +0100 Subject: 20090728-2113 --- CHANGES | 1 + appl/svc/httpd/cache.b | 22 +++++++++++----------- dis/svc/httpd/cache.dis | Bin 1957 -> 1895 bytes 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 25f0208d..ba465c08 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ emu/port/main.c: put host's working directory name as emuwdir document initial environment variables in emu(1) appl/lib/bufio.b dis/lib/bufio.dis [issue 199] don't lose track of actual file seek offset (following second suggestion of mjl) + issue 196: after general apologies for appl/svc/httpd/cache.b (don't look if you don't need it, not one of ours, etc. etc.) will patch as suggested by extrudedaluminiu(!) [vs] 20090719 correct order of operands to memset(!), eg in ipif [mjl] 20090718 diff --git a/appl/svc/httpd/cache.b b/appl/svc/httpd/cache.b index 3d4549e4..d733b0a3 100644 --- a/appl/svc/httpd/cache.b +++ b/appl/svc/httpd/cache.b @@ -121,20 +121,20 @@ throw_out() if (tmp!=nil) break; } - if (i==HASHSIZE && (dbg_log!=nil)) - sys->fprint(dbg_log,"LRU not found!!!\n"); # now, the lru is in tab[i]... nlist=nil; - for(;tab[i]!=nil;tab[i]=tl tab[i]){ - if ((hd tab[i]).tag==lru){ - if (dbg_log!=nil) - sys->fprint(dbg_log,"Throwing out %s\n",(hd tab[i]).name); - cur_size-=(hd tab[i]).length; - tab[i] = tl tab[i]; + if(i < len tab){ + for(;tab[i]!=nil;tab[i]=tl tab[i]){ + if ((hd tab[i]).tag==lru){ + if (dbg_log!=nil) + sys->fprint(dbg_log,"Throwing out %s\n",(hd tab[i]).name); + cur_size-=(hd tab[i]).length; + tab[i] = tl tab[i]; + } + if (tab[i]!=nil) + nlist = (hd tab[i]) :: nlist; + if (tab[i]==nil) break; } - if (tab[i]!=nil) - nlist = (hd tab[i]) :: nlist; - if (tab[i]==nil) break; } lru=find_lru(); if (dbg_log!=nil) diff --git a/dis/svc/httpd/cache.dis b/dis/svc/httpd/cache.dis index 6bbc4828..38a26211 100644 Binary files a/dis/svc/httpd/cache.dis and b/dis/svc/httpd/cache.dis differ -- cgit v1.2.3