summaryrefslogtreecommitdiffstats
path: root/mbbsd/mail.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-19 00:31:53 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-19 00:31:53 +0800
commit0afdc34099c449efa58429c0555b68395758a5b4 (patch)
tree067259f7ec8201abf0792abc6bd4812773dcc557 /mbbsd/mail.c
parent3ff5039f02c494a9ad333a3412a89a6f4939458e (diff)
downloadpttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar.gz
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar.bz2
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar.lz
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar.xz
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.tar.zst
pttbbs-0afdc34099c449efa58429c0555b68395758a5b4.zip
* allow the 'hold mail' to appear as changed title
* refine emaildb error messages git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4661 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mail.c')
-rw-r--r--mbbsd/mail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/mail.c b/mbbsd/mail.c
index f899b673..aafd9f16 100644
--- a/mbbsd/mail.c
+++ b/mbbsd/mail.c
@@ -393,7 +393,7 @@ hold_mail(const char *fpath, const char *receiver, const char *title)
}
int
-do_innersend(const char *userid, char *mfpath, const char *title)
+do_innersend(const char *userid, char *mfpath, const char *title, char *newtitle)
{
fileheader_t mhdr;
char fpath[PATHLEN];
@@ -419,6 +419,7 @@ do_innersend(const char *userid, char *mfpath, const char *title)
}
strlcpy(mhdr.title, save_title, sizeof(mhdr.title));
+ if (newtitle) strlcpy(newtitle, save_title, STRLEN);
sethomefile(fpath, userid, FN_OVERRIDES);
i = file_exist_record(fpath, cuser.userid);
sethomefile(fpath, userid, FN_REJECT);
@@ -498,7 +499,8 @@ do_send(const char *userid, const char *title)
} else {
- ret = do_innersend(userid, fpath, save_title);
+ // XXX the title maybe changed inside do_innersend...
+ ret = do_innersend(userid, fpath, save_title, save_title);
if (ret == 0) // success
hold_mail(fpath, userid, save_title);