summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/pttstruct.h3
-rw-r--r--mbbsd/board.c4
-rw-r--r--mbbsd/fav.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index 92889865..01e7e61c 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -378,6 +378,9 @@ typedef struct {
int Bbusystate;
time_t close_vote_time;
+ /* if true, fav.c:cleanup() will remove the invalid boards from record. */
+ char cleanboard;
+
/* pttcache */
char notes[MAX_MOVIE][200*11];
char today_is[20];
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 0c50ede1..77cdc756 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -321,10 +321,6 @@ void imovefav(int old)
move_in_current_folder(old, new);
}
-inline int validboard(int bid){
- return bcache[bid].brdname[0];
-}
-
void load_brdbuf(void)
{
static char firsttime = 1;
diff --git a/mbbsd/fav.c b/mbbsd/fav.c
index fb78006a..4358f425 100644
--- a/mbbsd/fav.c
+++ b/mbbsd/fav.c
@@ -237,7 +237,7 @@ static void rebuild_fav(fav_t *fp)
switch (get_item_type(ft)){
case FAVT_BOARD:
bid = cast_board(ft)->bid;
- if (!validboard(bid - 1))
+ if (SHM->cleanboard && bcache[bid - 1].brdname[0])
continue;
break;
case FAVT_LINE: