summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-16 11:57:23 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-16 11:57:23 +0800
commit0bd90a389d5c86f0aa255ce6dbff8c6669529457 (patch)
tree2a9d99f4800af6a0c4f805144e2bff50165733df /mbbsd/cache.c
parent2cf81a3c572cb71202ca492d11f7ce6b0400fc2f (diff)
downloadpttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar.gz
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar.bz2
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar.lz
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar.xz
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.tar.zst
pttbbs-0bd90a389d5c86f0aa255ce6dbff8c6669529457.zip
push bottom fix
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1768 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index 0d542ba5..b7ecb0be 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -655,8 +655,17 @@ setbottomtotal(int bid)
{
boardheader_t *bh = getbcache(bid);
char genbuf[256];
+ int n;
setbfile(genbuf, bh->brdname, ".DIR.bottom");
- SHM->n_bottom[bid-1]=get_num_records(genbuf, sizeof(fileheader_t));
+ n = get_num_records(genbuf, sizeof(fileheader_t));
+ if(n>5)
+ {
+ log_file("push_bottom.fix", genbuf, 1);
+ unlink(genbuf);
+ SHM->n_bottom[bid-1]=0;
+ }
+ else
+ SHM->n_bottom[bid-1]=n;
}
void
setbtotal(int bid)