summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-26 03:06:22 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-06-26 03:06:22 +0800
commitacc243fc5d8cd196664f64ccf68c47351a60260a (patch)
treed1689efff77a3a93e0dfeee0549e437dbefcceed /mbbsd/read.c
parent85d2b41177d66a43eb0a176c0a9c686569e9e460 (diff)
downloadpttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar.gz
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar.bz2
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar.lz
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar.xz
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.tar.zst
pttbbs-acc243fc5d8cd196664f64ccf68c47351a60260a.zip
1.debug select_read problem with "SR" in board name.
2.cache mailsum. get_sum_record is a bad function that cause a lot of IO git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2087 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 53bc09ba..cb0d397c 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -177,6 +177,9 @@ TagPruner(int bid)
TagNum = 0;
if (bid)
setbtotal(bid);
+ else if(currstat == RMAIL)
+ touchmailusage();
+
return NEWDIRECT;
}
return DONOTHING;
@@ -337,7 +340,7 @@ select_read(keeploc_t * locmem, int sr_mode)
fileheader_t fhs[READSIZE];
char newdirect[MAXPATHLEN];
char keyword[TTLEN + 1] = "";
- char genbuf[MAXPATHLEN], *p = strstr(currdirect, "SR");
+ char genbuf[MAXPATHLEN], *p = strstr(currdirect, "SR.");
static int _mode = 0;
int len, fd, fr, i, count=0, reference = 0;
@@ -374,8 +377,8 @@ select_read(keeploc_t * locmem, int sr_mode)
else
_mode |= sr_mode;
- snprintf(genbuf, sizeof(genbuf), "%s.%X.%X.%X",
- p ? p : "SR",
+ snprintf(genbuf, sizeof(genbuf), "%s%X.%X.%X",
+ p ? p : "SR.",
sr_mode, strlen(keyword), StringHash(keyword));
if( strlen(genbuf) > MAXPATHLEN - 50 )
return READ_REDRAW; // avoid overflow