From 4aaaa108cec2c79127e4a49336fc5e159ae823c8 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 24 May 2002 18:34:22 +0000 Subject: *** empty log message *** git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@204 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/board.c | 4 ++-- mbbsd/cache.c | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/board.c b/mbbsd/board.c index 31569639..4600c095 100644 --- a/mbbsd/board.c +++ b/mbbsd/board.c @@ -1,4 +1,4 @@ -/* $Id: board.c,v 1.12 2002/05/24 18:24:22 ptt Exp $ */ +/* $Id: board.c,v 1.13 2002/05/24 18:34:22 ptt Exp $ */ #include #include #include @@ -621,7 +621,7 @@ static void show_brdlist(int head, int clsflag, int newflag) { prints("\033[31mHOT\033[m"); else if(ptr->bh->nuser) prints("\033[31m%2d\033[m ",ptr->bh->nuser); - else prints(" %c ", ptr->bh->bvote? ' ':'V'); + else prints(" %c ", ptr->bh->bvote? 'V':' '); prints("%.13s", ptr->bh->BM); refresh(); } else { 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 #include #include @@ -653,6 +653,8 @@ static void reload_bcache() { sort_bcache(); for(i=0;inumber;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: 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; } } -- cgit v1.2.3