Fixed wrong To: address in gated newsmessages
This commit is contained in:
parent
e6f0072fec
commit
dfa2baebd3
@ -4675,6 +4675,8 @@ v0.33.20 10-Feb-2002
|
||||
When a ticfile was received while our aka is in the path, the
|
||||
bad tic counter wasn't increased.
|
||||
Made error message in AddMsgHdr function more clear.
|
||||
Removed experimental patch in news->ftn gate were wrong To:
|
||||
address was created.
|
||||
|
||||
mball:
|
||||
Will not crash anymore when it needs more then 10 minutes to
|
||||
|
@ -105,6 +105,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
|
||||
|
||||
buf = calloc(4097, sizeof(char));
|
||||
while (fgets(buf, 4096, ap)) {
|
||||
if (strlen(buf) && isalnum(buf[0])) {
|
||||
tag = strtok(buf, "\t \r\n\0");
|
||||
p = strtok(NULL, "\r\n\0");
|
||||
desc = p;
|
||||
@ -231,6 +232,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
|
||||
msgs.Tag, msgs.Group, offset, ascfnode(f , 0x1f));
|
||||
return 0;
|
||||
} /* if (strcmp(tag, Area) == 0) */
|
||||
} /* if (strlen(buf) && isalnum(buf[0])) */
|
||||
} /* while (fgets(buf, 4096, ap)) */
|
||||
|
||||
Syslog('m', "Area %s not found in taglist", Area);
|
||||
|
@ -228,12 +228,9 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
p = xstrcpy(hdr((char *)"X-Fidonet-Comment-To",msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"X-Apparently-To",msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"Reply-To", msg));
|
||||
if (p == NULL)
|
||||
p = xstrcpy(hdr((char *)"To", msg)); /* 14-Aug-2001 MB */
|
||||
if (p) {
|
||||
Syslog('n', "getting `to' address from: \"%s\"",p);
|
||||
if ((tmsg->to = parsefaddr(p)) == NULL)
|
||||
tmsg->to = parsefaddr((char *)"All@p0.f0.n0.z0");
|
||||
if ((l = strrchr(p,'<')) && (r = strchr(p,'>')) && (l < r)) {
|
||||
@ -285,7 +282,9 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
tmsg->to->point = msgs.Aka.point;
|
||||
tmsg->to->domain = xstrcpy(msgs.Aka.domain);
|
||||
} else {
|
||||
Syslog('n', "Filling default To: address");
|
||||
/*
|
||||
* Filling a default To: address.
|
||||
*/
|
||||
tmsg->to = (faddr*)malloc(sizeof(faddr));
|
||||
tmsg->to->name = xstrcpy((char *)"All");
|
||||
tmsg->to->zone = msgs.Aka.zone;
|
||||
@ -294,7 +293,7 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
tmsg->to->point = msgs.Aka.point;
|
||||
tmsg->to->domain = xstrcpy(msgs.Aka.domain);
|
||||
}
|
||||
Syslog('n', "TO: %s",ascfnode(tmsg->to,0xff));
|
||||
Syslog('N', "TO: %s",ascfnode(tmsg->to,0xff));
|
||||
} else {
|
||||
if (recipient) {
|
||||
/*
|
||||
@ -363,9 +362,7 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
while (isspace(*freename))
|
||||
freename++;
|
||||
}
|
||||
// if (p) NOT IN IFMAIL
|
||||
// free(p);
|
||||
// p = NULL;
|
||||
|
||||
if (rfcfrom) {
|
||||
while (isspace(*rfcfrom))
|
||||
rfcfrom++;
|
||||
@ -389,9 +386,8 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
if ((!freename) || ((freename) && (*freename == '\0')) || (strcmp(freename,".")==0))
|
||||
freename=rfcfrom;
|
||||
|
||||
// p = NULL;
|
||||
if (newsmode)
|
||||
Syslog('n', "FROM: %s <%s>", freename, rfcfrom);
|
||||
Syslog('M', "FROM: %s <%s>", freename, rfcfrom);
|
||||
else
|
||||
Syslog('+', "from: %s <%s>",freename,rfcfrom);
|
||||
|
||||
@ -419,10 +415,11 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
replyaddr=NULL;
|
||||
}
|
||||
if (needreplyaddr && (tmsg->from == NULL)) {
|
||||
Syslog('m', "fill replyaddr with \"%s\"",rfcfrom);
|
||||
Syslog('M', "fill replyaddr with \"%s\"",rfcfrom);
|
||||
replyaddr=xstrcpy(rfcfrom);
|
||||
}
|
||||
|
||||
if (tmsg->from)
|
||||
Syslog('m', "From address was%s distinguished as ftn", tmsg->from ? "" : " not");
|
||||
|
||||
if (newsmode)
|
||||
@ -503,11 +500,7 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
} else {
|
||||
tmsg->subj = xstrcpy((char *)" ");
|
||||
}
|
||||
// if (p)
|
||||
// free(p);
|
||||
// p = NULL;
|
||||
|
||||
Syslog('m', "SUBJ: \"%s\"", tmsg->subj);
|
||||
Syslog('M', "SUBJ: \"%s\"", tmsg->subj);
|
||||
|
||||
if ((p = hdr((char *)"X-FTN-FLAGS",msg)))
|
||||
tmsg->flags |= flagset(p);
|
||||
@ -569,7 +562,7 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
else
|
||||
tmsg->reply_a=NULL;
|
||||
|
||||
Syslog('m', "DATE: %s, MSGID: %s %lx, REPLY: %s %lx",
|
||||
Syslog('M', "DATE: %s, MSGID: %s %lx, REPLY: %s %lx",
|
||||
ftndate(tmsg->date), MBSE_SS(tmsg->msgid_a),tmsg->msgid_n, MBSE_SS(tmsg->reply_a),tmsg->reply_n);
|
||||
|
||||
p = hdr((char *)"Organization",msg);
|
||||
@ -589,7 +582,7 @@ ftnmsg *mkftnhdr(rfcmsg *msg, int incode, int outcode, int newsmode, faddr *reci
|
||||
tmsg->origin = xstrcpy(CFG.origin);
|
||||
}
|
||||
|
||||
Syslog('m', "ORIGIN: %s", MBSE_SS(tmsg->origin));
|
||||
Syslog('M', "ORIGIN: %s", MBSE_SS(tmsg->origin));
|
||||
return tmsg;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user