From 0afdc34099c449efa58429c0555b68395758a5b4 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 18 Jun 2009 16:31:53 +0000 Subject: * 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 --- mbbsd/mail.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mbbsd/mail.c') 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); -- cgit v1.2.3