From edcd7f430c25db70cf1d43b558e8f90eeeadac8e Mon Sep 17 00:00:00 2001 From: in2 Date: Sun, 30 Jun 2002 16:06:43 +0000 Subject: board cache problem git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@395 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/util_cache.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'util') diff --git a/util/util_cache.c b/util/util_cache.c index e99f52ea..2426044c 100644 --- a/util/util_cache.c +++ b/util/util_cache.c @@ -1,4 +1,4 @@ -/* $Id: util_cache.c,v 1.7 2002/06/30 03:43:55 ptt Exp $ */ +/* $Id: util_cache.c,v 1.8 2002/06/30 16:06:43 in2 Exp $ */ #include #include #include @@ -141,6 +141,7 @@ void sem_lock(int op,int semid) { SHM_t *SHM; int *GLOBALVAR; boardheader_t *bcache; +int numboards = -1; void attach_SHM(void) { @@ -157,6 +158,9 @@ void attach_SHM(void) if( SHM->Ftouchtime == 0 ) SHM->Ftouchtime = 1; + + bcache = SHM->bcache; + numboards = SHM->Bnumber; } int setumoney(int uid, int money) { @@ -308,22 +312,17 @@ userinfo_t *search_ulist(int uid) { /* .BOARDS cache */ /*-------------------------------------------------------*/ char *fn_board=BBSHOME"/"FN_BOARD; -boardheader_t *bcache; - static void reload_bcache() { if(SHM->Bbusystate) { safe_sleep(1); } } -int numboards = -1; - void resolve_boards() { if(SHM == NULL) { attach_SHM(); if(SHM->Btouchtime == 0) SHM->Btouchtime = 1; - bcache = SHM->bcache; } while(SHM->Buptime < SHM->Btouchtime) -- cgit v1.2.3