summaryrefslogtreecommitdiffstats
path: root/mbbsd
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
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')
-rw-r--r--mbbsd/board.c4
-rw-r--r--mbbsd/cache.c13
2 files changed, 13 insertions, 4 deletions
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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 <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;
}
}