diff options
author | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-06 00:00:12 +0800 |
---|---|---|
committer | ptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-06 00:00:12 +0800 |
commit | 07b0628a5700b1d3bb5281b64fa9d5ac7073ed87 (patch) | |
tree | f5aa26e861b049a02c80068c67e0b13cc5c577dc | |
parent | dbd9a354806f0e6695ec8c428cf91e2ed2c77dad (diff) | |
download | pttbbs-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
-rw-r--r-- | mbbsd/read.c | 12 |
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; |