From 568008a5e3dfd2b6d7e41fecdf9cd750d4e98db0 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Thu, 7 Feb 2002 21:09:24 +0000 Subject: [PATCH] Experimental patch for ftn2rfc gate --- ChangeLog | 2 ++ mbfido/ftn2rfc.c | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fe9ffde..0cb80f0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4507,6 +4507,8 @@ v0.33.19 26-Oct-2001 Now limits fetching of newsheaders according to area setting. Added the Size parameter to the tic files, this appeared to be missing since a while. + Fixes for Fido->internet gate for dropped characters during + linewrap. Experimental. mbfile: During check the file databases are reset to filemode 0660. diff --git a/mbfido/ftn2rfc.c b/mbfido/ftn2rfc.c index 73784d33..3923d024 100644 --- a/mbfido/ftn2rfc.c +++ b/mbfido/ftn2rfc.c @@ -581,7 +581,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl newsmode = TRUE; } else newsmode = FALSE; - Syslog('M', "Got %s message", newsmode?"echo":"netmail"); + Syslog('m', "Got %s message", newsmode?"echo":"netmail"); if ((outcode == CHRS_NOTSET) && (hdr((char *)"MSGID", kmsg))) { p = rfcmsgid(hdr((char *)"MSGID",kmsg),bestaka); @@ -905,14 +905,17 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl * Probaly not needed as messages for systems without ISP never get here. * Perhaps only news to moderators. */ + Syslog('m', "We should not be here"); sprintf(temp, "From %s!%s %s", ascinode(f,0x3f), ascinode(f,0x40), ctime(&mdate)); Send(FALSE, temp); } + Syslog('m', "Should send Received: header for mbfido"); sprintf(temp, "Received: from %s by %s\n", ascinode(f,0x3f), ascinode(bestaka,0x3f)); Send(FALSE, temp); sprintf(temp, "\twith FTN (mbfido v.%s) id AA%u; %s\n", VERSION, getpid(), rfcdate(now)); Send(FALSE, temp); + Syslog('m', "Is done now"); for (qmsg = kmsg; qmsg; qmsg = qmsg->next) if (!strcasecmp(qmsg->key,"RFC-Received")) { @@ -1539,7 +1542,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl count = lines = 0; first = TRUE; - Syslog('M', "Start sending message body"); + Syslog('m', "Start sending message body"); while (fgets(buf,sizeof(buf)-1,fp) && pass) { if (first) { p = xstrcpy((char *)"\n"); @@ -1558,7 +1561,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl } if (ftell(fp) > endmsg_off) { - Syslog('M', "line \"%s\" past message end %ld %ld", buf,(long)endmsg_off, ftell(fp)); + Syslog('m', "line \"%s\" past message end %ld %ld", buf,(long)endmsg_off, ftell(fp)); pass=0; } if (pass) { @@ -1571,9 +1574,11 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl } if ((count++ > BOUNDARY) && (!pgpsigned)) { if (b) { - *b++='\r'; - *b = '\n'; - p=b+2; +// *b++='\r'; +// *b = '\n'; + *b++='\n'; // Replace space. + p = b + 1; +// p=b+2; b=NULL; lines++; count=0; @@ -1588,7 +1593,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl free(q); } } - Syslog('M', "End sending message body"); + Syslog('m', "End sending message body"); if ((modtype==1) && (!hdr((char *)"Approved",msg)) && (!hdr((char *)"RFC-Approved",kmsg)) && (!hdr((char *)"Approved",kmsg)))