summaryrefslogtreecommitdiffstats
path: root/mbbsd/admin.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-02 23:01:58 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-02 23:01:58 +0800
commit1bd5e9b55a1998899e6569b72fd3a6388b952f09 (patch)
tree5f9fc393f5c6a7ede4250e60fee6b256716e9f02 /mbbsd/admin.c
parentc2b2860276b8fd1976373bb776f784689af98ea1 (diff)
downloadpttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar.gz
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar.bz2
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar.lz
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar.xz
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.tar.zst
pttbbs-1bd5e9b55a1998899e6569b72fd3a6388b952f09.zip
avoid race condition at tag board->paste board
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1917 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/admin.c')
-rw-r--r--mbbsd/admin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 6e98ff2e..e828e3f3 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -263,6 +263,7 @@ void delete_symbolic_link(boardheader_t *bh, int bid)
memset(bh, 0, sizeof(boardheader_t));
substitute_record(fn_board, bh, sizeof(boardheader_t), bid);
reset_board(bid);
+ sort_bcache();
log_usies("DelLink", bh->brdname);
}
@@ -361,6 +362,7 @@ m_mod_board(char *bname)
post_msg("Security", bh.title, "請注意刪除的合法性", "[系統安全局]");
substitute_record(fn_board, &bh, sizeof(bh), bid);
reset_board(bid);
+ sort_bcache();
log_usies("DelBoard", bh.title);
outs("刪板完畢");
}
@@ -448,6 +450,7 @@ m_mod_board(char *bname)
setup_man(&newbh);
substitute_record(fn_board, &newbh, sizeof(newbh), bid);
reset_board(bid);
+ sort_bcache();
log_usies("SetBoard", newbh.brdname);
}
}
@@ -607,6 +610,7 @@ static int add_board_record(boardheader_t *board)
if ((bid = getbnum("")) > 0) {
substitute_record(fn_board, board, sizeof(boardheader_t), bid);
reset_board(bid);
+ sort_bcache();
} else if (append_record(fn_board, (fileheader_t *)board, sizeof(boardheader_t)) == -1) {
return -1;
} else {