Fixed newspost
This commit is contained in:
parent
5acf877610
commit
dae0229e9c
@ -269,7 +269,7 @@ void Send(int newsmode, char *outstr)
|
||||
unsigned long crc;
|
||||
|
||||
fwrite(outstr, 1, strlen(outstr), nfp);
|
||||
Syslog('m', "+ %s\n", printable(outstr, 0));
|
||||
// Syslog('m', "+ %s\n", printable(outstr, 0));
|
||||
|
||||
if (newsmode) {
|
||||
Striplf(outstr);
|
||||
@ -1292,7 +1292,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
|
||||
* GoldED posts news with plain ftn kludges as rfc headers.
|
||||
*/
|
||||
if ((p = hdr((char *)"CHRS", msg))) {
|
||||
sprintf(temp, "X-FTN-CHARS:%s", p);
|
||||
sprintf(temp, "X-FTN-CHRS:%s", p);
|
||||
Send(newsmode, temp);
|
||||
}
|
||||
if ((p = hdr((char *)"MSGID", msg))) {
|
||||
@ -1540,11 +1540,8 @@ 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';
|
||||
*b++='\n'; // Replace space.
|
||||
p = b + 1;
|
||||
// p=b+2;
|
||||
b=NULL;
|
||||
lines++;
|
||||
count=0;
|
||||
@ -1581,8 +1578,6 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
|
||||
fprintf(nfp, ".\n");
|
||||
}
|
||||
|
||||
// if (p) Geeft segfault
|
||||
// free(p);
|
||||
if (newsgroup)
|
||||
free(newsgroup);
|
||||
if (distribution)
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Purpose ...............: Post newsarticles in temp newsfile.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Copyright (C) 1997-2004
|
||||
* Copyright (C) 1997-2005
|
||||
*
|
||||
* Michiel Broek FIDO: 2:280/2802
|
||||
* Beekmansbos 10 Internet: mbroek@users.sourceforge.net
|
||||
@ -121,7 +121,6 @@ int newspost(void)
|
||||
fclose(nfp);
|
||||
return TRUE;
|
||||
}
|
||||
buf = calloc(10240, sizeof(char));
|
||||
|
||||
count = curpos = 0;
|
||||
while (feof(ofp) == 0) {
|
||||
@ -219,8 +218,11 @@ int newspost(void)
|
||||
unlink(buf);
|
||||
}
|
||||
|
||||
if (! news_bad) {
|
||||
sprintf(buf, "%s/tmp/newsout", getenv("MBSE_ROOT"));
|
||||
unlink(buf);
|
||||
}
|
||||
|
||||
free(buf);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ char *getrfcchrs(int val)
|
||||
|
||||
void Add_Headkludges(faddr *dest, int IsReply)
|
||||
{
|
||||
char *temp, *temp2;
|
||||
char *temp;
|
||||
unsigned long crc = -1;
|
||||
time_t tt;
|
||||
int i;
|
||||
@ -219,19 +219,12 @@ void Add_Headkludges(faddr *dest, int IsReply)
|
||||
sprintf(temp, "\001Date: %s", rfcdate(Msg.Written));
|
||||
MsgText_Add2(temp);
|
||||
Node = fido2faddr(msgs.Aka);
|
||||
temp2 = xstrcpy(Msg.From);
|
||||
for (i = 0; i < strlen(temp2); i++)
|
||||
if (temp2[i] == ' ')
|
||||
temp2[i] = '_';
|
||||
// sprintf(temp, "\001From: %s@%s (%s)", temp2, ascinode(Node, 0x2f), Msg.From);
|
||||
sprintf(temp, "\001From: %s", Msg.From);
|
||||
MsgText_Add2(temp);
|
||||
sprintf(temp, "\001Subject: %s", Msg.Subject);
|
||||
MsgText_Add2(temp);
|
||||
// sprintf(temp, "\001Sender: %s@%s (%s)", temp2, ascinode(Node, 0x2f), Msg.From);
|
||||
sprintf(temp, "\001Sender: %s", Msg.From);
|
||||
MsgText_Add2(temp);
|
||||
free(temp2);
|
||||
tidy_faddr(Node);
|
||||
MsgText_Add2((char *)"\001To: All");
|
||||
MsgText_Add2((char *)"\001MIME-Version: 1.0");
|
||||
|
Reference in New Issue
Block a user