summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c2
-rw-r--r--mbbsd/mail.c8
-rw-r--r--mbbsd/read.c2
-rw-r--r--mbbsd/record.c5
4 files changed, 6 insertions, 11 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index f2f48a05..80c3add4 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1668,7 +1668,7 @@ del_range(int ent, fileheader_t *fhdr, char *direct)
if (currmode & MODE_BOARD) // Ptt:update cache
setbtotal(currbid);
else if(currstat == RMAIL)
- touchmailusage();
+ setupmailusage();
return DIRCHANGED;
}
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index 015776e3..bb98674c 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -138,12 +138,6 @@ m_init()
}
void
-touchmailusage()
-{
- mailkeep=0;
-}
-
-void
setupmailusage()
{ // Ptt: get_sum_records is a bad function
int max_keepmail = MAX_KEEPMAIL;
@@ -841,7 +835,7 @@ mail_del(int ent, fileheader_t * fhdr, char *direct)
if (getans(msg_del_ny) == 'y') {
if (!delete_record(direct, sizeof(*fhdr), ent)) {
- touchmailusage();
+ setupmailusage();
setdirpath(genbuf, direct, fhdr->filename);
unlink(genbuf);
return DIRCHANGED;
diff --git a/mbbsd/read.c b/mbbsd/read.c
index cb0d397c..3dfac5cf 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -178,7 +178,7 @@ TagPruner(int bid)
if (bid)
setbtotal(bid);
else if(currstat == RMAIL)
- touchmailusage();
+ setupmailusage();
return NEWDIRECT;
}
diff --git a/mbbsd/record.c b/mbbsd/record.c
index c8393f6f..a11b3a56 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -308,7 +308,7 @@ delete_range(char *fpath, int id1, int id2)
nol_t my;
char fullpath[STRLEN], *t;
int fdr, fdw, fd;
- int count;
+ int count, dcount=0;
nolfilename(&my, fpath);
@@ -356,6 +356,7 @@ delete_range(char *fpath, int id1, int id2)
} else {
//if (dashd(fullpath))
unlink(fullpath);
+ dcount++;
}
++count;
}
@@ -368,7 +369,7 @@ delete_range(char *fpath, int id1, int id2)
}
flock(fd, LOCK_UN);
close(fd);
- return 0;
+ return dcount;
}
#endif