Gate updates
This commit is contained in:
parent
2b24f98a15
commit
533ce0b634
@ -726,41 +726,43 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
|
||||
/*
|
||||
* Build Path: headerline
|
||||
*/
|
||||
q = xstrcpy((char *)"Path: ");
|
||||
if (CFG.newsfeed == FEEDUUCP) {
|
||||
/*
|
||||
* If we don't run our own newsserver we have to simulate and
|
||||
* add the UUCP nodename here.
|
||||
*/
|
||||
memset(&utsbuf, 0, sizeof(utsbuf));
|
||||
if (uname(&utsbuf)) {
|
||||
WriteError("Can't get system nodename");
|
||||
} else {
|
||||
q = xstrcat(q, utsbuf.nodename);
|
||||
q = xstrcat(q, (char *)"!");
|
||||
if (CFG.newsfeed != FEEDINN) {
|
||||
q = xstrcpy((char *)"Path: ");
|
||||
if (CFG.newsfeed == FEEDUUCP) {
|
||||
/*
|
||||
* If we don't run our own newsserver we have to simulate and
|
||||
* add the UUCP nodename here.
|
||||
*/
|
||||
memset(&utsbuf, 0, sizeof(utsbuf));
|
||||
if (uname(&utsbuf)) {
|
||||
WriteError("Can't get system nodename");
|
||||
} else {
|
||||
q = xstrcat(q, utsbuf.nodename);
|
||||
q = xstrcat(q, (char *)"!");
|
||||
}
|
||||
}
|
||||
}
|
||||
tfaddr = fido2faddr(msgs.Aka);
|
||||
q = xstrcat(q, ascinode(tfaddr, 0x07));
|
||||
tidy_faddr(tfaddr);
|
||||
q = xstrcat(q, (char *)"!");
|
||||
if (ftnpath)
|
||||
for (tfa=ftnpath->next;tfa;tfa=tfa->next) {
|
||||
/* FIXME: possible memory leak */
|
||||
q = xstrcat(q, ascinode(tfa->addr,0x1f));
|
||||
q = xstrcat(q, (char *)"!");
|
||||
}
|
||||
tidy_falist(&ftnpath);
|
||||
tfaddr = fido2faddr(msgs.Aka);
|
||||
q = xstrcat(q, ascinode(tfaddr, 0x07));
|
||||
tidy_faddr(tfaddr);
|
||||
q = xstrcat(q, (char *)"!");
|
||||
if (ftnpath)
|
||||
for (tfa=ftnpath->next;tfa;tfa=tfa->next) {
|
||||
/* FIXME: possible memory leak */
|
||||
q = xstrcat(q, ascinode(tfa->addr,0x1f));
|
||||
q = xstrcat(q, (char *)"!");
|
||||
}
|
||||
tidy_falist(&ftnpath);
|
||||
|
||||
if (p) {
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
q = xstrcat(q, p);
|
||||
} else
|
||||
q = xstrcat(q, (char *)"not-for-mail");
|
||||
sprintf(temp, "%s\n", q);
|
||||
Send(newsmode, temp);
|
||||
free(q);
|
||||
if (p) {
|
||||
while (isspace(*p))
|
||||
p++;
|
||||
q = xstrcat(q, p);
|
||||
} else
|
||||
q = xstrcat(q, (char *)"not-for-mail");
|
||||
sprintf(temp, "%s\n", q);
|
||||
Send(newsmode, temp);
|
||||
free(q);
|
||||
}
|
||||
|
||||
if ((p = hdr((char *)"Newsgroups",msg))) {
|
||||
/*
|
||||
|
@ -162,15 +162,18 @@ int findorigmsg(char *msgid, char *o)
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(currentgroup,msgs.Newsgroup);
|
||||
strcpy(currentgroup, msgs.Newsgroup);
|
||||
start = MsgBase.Lowest;
|
||||
end = MsgBase.Highest;
|
||||
|
||||
gen2 = calloc(strlen(msgid)+1,sizeof(char));
|
||||
strcpy(gen2, strchr(msgid,'<'));
|
||||
Syslog('m', "findorigmsg(%s): gen2=%s", msgid, gen2);
|
||||
|
||||
for (i = start; i <= end; i++) {
|
||||
if (Msg_ReadHeader(i)) {
|
||||
if (strncmp(gen2,make_msgid(Msg.Msgid),strlen(gen2)-1) == 0) {
|
||||
// Syslog('m', "findorigmsg() %d, %s / %s (%s)", i, gen2, make_msgid(Msg.Msgid), Msg.Msgid);
|
||||
if (strncmp(gen2, make_msgid(Msg.Msgid),strlen(gen2)-1) == 0) {
|
||||
Syslog('m',"Found msgid: %s",make_msgid(Msg.Msgid));
|
||||
// realloc(o,(strlen(Msg.Msgid)+1)* sizeof(char));
|
||||
strcpy(o,Msg.Msgid);
|
||||
@ -252,16 +255,16 @@ int rfc2ftn(FILE *fp, faddr *recipient)
|
||||
ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area);
|
||||
|
||||
//Griffin
|
||||
fmsg->reply_s = calloc(256,sizeof(char));
|
||||
// fmsg->reply_s = calloc(256,sizeof(char));
|
||||
|
||||
if (findorigmsg(p, fmsg->reply_s)) {
|
||||
fmsg->to->name = calloc(strlen(Msg.From)+1, sizeof(char));
|
||||
strcpy(fmsg->to->name, Msg.From);
|
||||
Syslog('m', "fmsg to-name %s", fmsg->to->name);
|
||||
Syslog('m', "reply_s %s", fmsg->reply_s);
|
||||
} else {
|
||||
Syslog('m', "findorigmsg nothing found");
|
||||
}
|
||||
// if (findorigmsg(p, fmsg->reply_s)) {
|
||||
// fmsg->to->name = calloc(strlen(Msg.From)+1, sizeof(char));
|
||||
// strcpy(fmsg->to->name, Msg.From);
|
||||
// Syslog('m', "fmsg to-name %s", fmsg->to->name);
|
||||
// Syslog('m', "reply_s %s", fmsg->reply_s);
|
||||
// } else {
|
||||
// Syslog('m', "findorigmsg nothing found");
|
||||
// }
|
||||
|
||||
if (!chkftnmsgid(p)) {
|
||||
hash_update_s(&fmsg->reply_n, fmsg->area);
|
||||
|
Reference in New Issue
Block a user