Gate updates

This commit is contained in:
Michiel Broek 2005-08-14 16:04:13 +00:00
parent 2b24f98a15
commit 533ce0b634
2 changed files with 49 additions and 44 deletions

View File

@ -726,6 +726,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
/* /*
* Build Path: headerline * Build Path: headerline
*/ */
if (CFG.newsfeed != FEEDINN) {
q = xstrcpy((char *)"Path: "); q = xstrcpy((char *)"Path: ");
if (CFG.newsfeed == FEEDUUCP) { if (CFG.newsfeed == FEEDUUCP) {
/* /*
@ -761,6 +762,7 @@ int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int fl
sprintf(temp, "%s\n", q); sprintf(temp, "%s\n", q);
Send(newsmode, temp); Send(newsmode, temp);
free(q); free(q);
}
if ((p = hdr((char *)"Newsgroups",msg))) { if ((p = hdr((char *)"Newsgroups",msg))) {
/* /*

View File

@ -162,15 +162,18 @@ int findorigmsg(char *msgid, char *o)
return 0; return 0;
} }
strcpy(currentgroup,msgs.Newsgroup); strcpy(currentgroup, msgs.Newsgroup);
start = MsgBase.Lowest; start = MsgBase.Lowest;
end = MsgBase.Highest; end = MsgBase.Highest;
gen2 = calloc(strlen(msgid)+1,sizeof(char)); gen2 = calloc(strlen(msgid)+1,sizeof(char));
strcpy(gen2, strchr(msgid,'<')); strcpy(gen2, strchr(msgid,'<'));
Syslog('m', "findorigmsg(%s): gen2=%s", msgid, gen2);
for (i = start; i <= end; i++) { for (i = start; i <= end; i++) {
if (Msg_ReadHeader(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)); Syslog('m',"Found msgid: %s",make_msgid(Msg.Msgid));
// realloc(o,(strlen(Msg.Msgid)+1)* sizeof(char)); // realloc(o,(strlen(Msg.Msgid)+1)* sizeof(char));
strcpy(o,Msg.Msgid); strcpy(o,Msg.Msgid);
@ -252,16 +255,16 @@ int rfc2ftn(FILE *fp, faddr *recipient)
ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area); ftnmsgid(p,&fmsg->reply_a, &fmsg->reply_n,fmsg->area);
//Griffin //Griffin
fmsg->reply_s = calloc(256,sizeof(char)); // fmsg->reply_s = calloc(256,sizeof(char));
if (findorigmsg(p, fmsg->reply_s)) { // if (findorigmsg(p, fmsg->reply_s)) {
fmsg->to->name = calloc(strlen(Msg.From)+1, sizeof(char)); // fmsg->to->name = calloc(strlen(Msg.From)+1, sizeof(char));
strcpy(fmsg->to->name, Msg.From); // strcpy(fmsg->to->name, Msg.From);
Syslog('m', "fmsg to-name %s", fmsg->to->name); // Syslog('m', "fmsg to-name %s", fmsg->to->name);
Syslog('m', "reply_s %s", fmsg->reply_s); // Syslog('m', "reply_s %s", fmsg->reply_s);
} else { // } else {
Syslog('m', "findorigmsg nothing found"); // Syslog('m', "findorigmsg nothing found");
} // }
if (!chkftnmsgid(p)) { if (!chkftnmsgid(p)) {
hash_update_s(&fmsg->reply_n, fmsg->area); hash_update_s(&fmsg->reply_n, fmsg->area);