diff options
-rw-r--r-- | include/proto.h | 2 | ||||
-rw-r--r-- | mbbsd/bbs.c | 2 | ||||
-rw-r--r-- | mbbsd/mail.c | 8 | ||||
-rw-r--r-- | mbbsd/read.c | 2 | ||||
-rw-r--r-- | mbbsd/record.c | 5 |
5 files changed, 7 insertions, 12 deletions
diff --git a/include/proto.h b/include/proto.h index a0cac682..25439698 100644 --- a/include/proto.h +++ b/include/proto.h @@ -312,7 +312,7 @@ int mail_all(void); int invalidaddr(char *addr); int do_send(char *userid, char *title); void my_send(char *uident); -void touchmailusage(); +void setupmailusage(); /* mbbsd */ void show_call_in(int save, int which); 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 |