summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-28 15:42:29 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-28 15:42:29 +0800
commite01d79c4da7f943576b8c9118c1a807277a09e0c (patch)
treeb20427ad1c36255ce3dbf2b8d50cc0faa92775c3
parent450ad26421aa1c38700dddc8899a3522e1cc5442 (diff)
downloadpttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar.gz
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar.bz2
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar.lz
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar.xz
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.tar.zst
pttbbs-e01d79c4da7f943576b8c9118c1a807277a09e0c.zip
Some functions in cache are never used in mbbsd.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2094 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-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));