summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-06 00:00:12 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-08-06 00:00:12 +0800
commit07b0628a5700b1d3bb5281b64fa9d5ac7073ed87 (patch)
treef5aa26e861b049a02c80068c67e0b13cc5c577dc /mbbsd
parentdbd9a354806f0e6695ec8c428cf91e2ed2c77dad (diff)
downloadpttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar.gz
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar.bz2
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar.lz
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar.xz
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.tar.zst
pttbbs-07b0628a5700b1d3bb5281b64fa9d5ac7073ed87.zip
incremental select
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2992 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/read.c12
1 files changed, 8 insertions, 4 deletions
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;