summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:21:40 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:21:40 +0800
commit34953aa4ec4100d0bfc840c99cc91f5e30ba0252 (patch)
treeb2693eeed514cd1c3d4572fe9116c273f4a7c29e /mbbsd
parent8fa7572e82e99ab32ce2568f83e150c5cab42a32 (diff)
downloadpttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar.gz
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar.bz2
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar.lz
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar.xz
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.tar.zst
pttbbs-34953aa4ec4100d0bfc840c99cc91f5e30ba0252.zip
bug fix: vote status not refresh properly and write value out of board array
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3334 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/vote.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index 8c4070e6..e12d72f0 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -413,7 +413,7 @@ static int
b_closepolls(void)
{
boardheader_t *fhp;
- int pos, dirty;
+ int pos;
vote_buffer_t vbuf;
#ifndef BARRIER_HAS_BEEN_IN_SHM
@@ -435,16 +435,14 @@ b_closepolls(void)
fclose(cfp);
#endif
- dirty = 0;
for (fhp = bcache, pos = 1; pos <= numboards; fhp++, pos++) {
if (fhp->bvote && b_close(fhp, &vbuf)) {
if (substitute_record(fn_board, fhp, sizeof(*fhp), pos) == -1)
outs(err_board_update);
- dirty = 1;
+ else
+ reset_board(pos);
}
}
- if (dirty) /* vote flag changed */
- reset_board(pos);
return 0;
}