From 51906a55268bb78e06de12b6687f32df49022f2b Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 22 Jul 2015 01:01:15 +0000 Subject: [PATCH] Attempt to address Psi-Jack's reported problem: Don't pack netmail that has the "SENT" attribute flag set. Set the "SENT" attribute flag in netmail (.msg) files so if they're not deleted they won't be repacked/sent again later. --- src/sbbs3/sbbsecho.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c index 64fb42afbd..7978ed2d56 100644 --- a/src/sbbs3/sbbsecho.c +++ b/src/sbbs3/sbbsecho.c @@ -5050,6 +5050,15 @@ int main(int argc, char **argv) continue; } printf("\n%s to %s ",getfname(path),smb_faddrtoa(&addr,NULL)); + if(hdr.attr&MSG_SENT) { + printf("already sent\n"); + fclose(fidomsg); + continue; + } + hdr.attr|=FIDO_SENT; + fseek(fidomsg,offsetof(fmsghdr_t,attr),SEEK_SET); + fwrite(&hdr.attr,sizeof(hdr.attr),1,fidomsg); + if(cfg.log&LOG_PACKING) logprintf("Packing %s (%s) attr=%04hX",path,smb_faddrtoa(&addr,NULL),hdr.attr); fmsgbuf=getfmsg(fidomsg,NULL); -- GitLab