summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-01 00:06:43 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-07-01 00:06:43 +0800
commitedcd7f430c25db70cf1d43b558e8f90eeeadac8e (patch)
treeb94da4b9f6757963787bd92fd63af6999e34d203
parente8ee20d0539ed33a782a233b3369f61aa9184ee0 (diff)
downloadpttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar.gz
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar.bz2
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar.lz
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar.xz
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.tar.zst
pttbbs-edcd7f430c25db70cf1d43b558e8f90eeeadac8e.zip
board cache problem
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@395 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--util/util_cache.c11
1 files changed, 5 insertions, 6 deletions
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 <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)