From 07b0628a5700b1d3bb5281b64fa9d5ac7073ed87 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 5 Aug 2005 16:00:12 +0000 Subject: incremental select git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2992 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/read.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/read.c b/mbbsd/read.c index 73ef43af..81e708ae 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -501,11 +501,15 @@ select_read(const keeploc_t * locmem, int sr_mode) setbfile(newdirect, currboard, genbuf); filetime = dasht(newdirect); - if( now - filetime < 180 ) - count = dashs(newdirect) / sizeof(fileheader_t); - else { + count = dashs(newdirect) / sizeof(fileheader_t); + + if( now - filetime > 180) + { if( now - filetime > 3600) - len = O_CREAT | O_RDWR; + { + len = O_CREAT | O_RDWR; + count=0; + } else len = O_APPEND; -- cgit v1.2.3