summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/cache.c7
-rw-r--r--mbbsd/mbbsd.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 842cedad..efdab497 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -524,6 +524,7 @@ sort_bcache(void)
SHM->Bbusystate = 0;
}
+#ifdef _BBS_UTIL_C_
void
reload_bcache(void)
{
@@ -541,6 +542,7 @@ reload_bcache(void)
close(fd);
}
memset(SHM->lastposttime, 0, MAX_BOARD * sizeof(time_t));
+ memset(SHM->total, 0, MAX_BOARD * sizeof(int));
/* 等所有 boards 資料更新後再設定 uptime */
SHM->Buptime = SHM->Btouchtime;
log_usies("CACHE", "reload bcache");
@@ -556,13 +558,18 @@ void resolve_boards(void)
}
numboards = SHM->Bnumber;
}
+#endif /* defined(_BBS_UTIL_C_)*/
+#if 0
+/* Unused */
void touch_boards(void)
{
SHM->Btouchtime = COMMON_TIME;
numboards = -1;
resolve_boards();
}
+#endif
+
void addbrd_touchcache(void)
{
SHM->Bnumber++;
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 402a71c6..c202e786 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -914,7 +914,8 @@ user_login()
log_usies("ENTER", fromhost);
setproctitle("%s: %s", margs, cuser.userid);
resolve_fcache();
- resolve_boards();
+ /* resolve_boards(); */
+ numboards = SHM->Bnumber;
memset(&water[0], 0, sizeof(water_t) * 6);
strlcpy(water[0].userid, " 全部 ", sizeof(water[0].userid));