diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-01 00:06:43 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2002-07-01 00:06:43 +0800 |
commit | d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3 (patch) | |
tree | 4cad56bb3a207867c1e68164a2c5c4f80f2850fa | |
parent | a1b0594ff34b404f92b86658be3de15185a7718b (diff) | |
download | pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar.gz pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar.bz2 pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar.lz pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar.xz pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.tar.zst pttbbs-d9d69b2ee87bb6dfeb8fd140a4f9690565221ee3.zip |
board cache problem
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@395 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/util/util_cache.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pttbbs/util/util_cache.c b/pttbbs/util/util_cache.c index e99f52ea..2426044c 100644 --- a/pttbbs/util/util_cache.c +++ b/pttbbs/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 <stdio.h> #include <stdlib.h> #include <string.h> @@ -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) |