summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-25 02:34:22 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-25 02:34:22 +0800
commit4aaaa108cec2c79127e4a49336fc5e159ae823c8 (patch)
tree127910f576037b48478b79e5390932d25c9ad00f /mbbsd/cache.c
parent2aed4fa0ea1d611cd75402562ea2564bbd223ede (diff)
downloadpttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar.gz
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar.bz2
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar.lz
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar.xz
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.tar.zst
pttbbs-4aaaa108cec2c79127e4a49336fc5e159ae823c8.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@204 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index e672ee56..81cc01b0 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.27 2002/05/22 15:59:07 in2 Exp $ */
+/* $Id: cache.c,v 1.28 2002/05/24 18:34:22 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -653,6 +653,8 @@ static void reload_bcache() {
sort_bcache();
for(i=0;i<brdshm->number;i++)
{
+ bcache[i].u=NULL;
+ bcache[i].nuser=0;
bcache[i].firstchild[0]=NULL;
bcache[i].firstchild[1]=NULL;
}
@@ -689,15 +691,20 @@ void addbrd_touchcache()
}
#if !defined(_BBS_UTIL_C_)
void reset_board(int bid) { /* Ptt: 這樣就不用老是touch board了 */
- int fd,i;
+ int fd,i,nuser;
+ void *u;
boardheader_t *bhdr;
+
if(--bid < 0)
return;
if(brdshm->busystate || brdshm->busystate_b[bid-1]) {
safe_sleep(1);
} else {
brdshm->busystate_b[bid-1] = 1;
+ nuser = bcache[bid-1].nuser;
+ u = bcache[bid-1].u;
+
bhdr = bcache;
bhdr += bid;
if((fd = open(fn_board, O_RDONLY)) > 0) {
@@ -711,6 +718,8 @@ void reset_board(int bid) { /* Ptt: 這樣就不用老是touch board了 */
bcache[i].firstchild[0]=NULL;
bcache[i].firstchild[1]=NULL;
}
+ nuser = bcache[bid-1].nuser;
+ u = bcache[bid-1].u;
brdshm->busystate_b[bid-1] = 0;
}
}