ANU News Patch Patch ID: 920417_newsadd.c!ewilts@galaxy.gov.bc.ca Date: 17-Apr-1992 Author: Ed Wilts ewilts@galaxy.gov.bc.ca News Version: 6.1beta5 News Files: NewsAdd.C Description: Eliminates logging of each article processed. Only warning messages are generated, and these contain message ID, since there's no processing message to identify the current message. Supplemented: 930520_newsadd.c!mark.martinec@ijs.si *** newsadd.c; --- newsadd_new.c ************** *** 170,172 **-- **/ --- 170,175 ----- + ** V6.1 17-Apr-1992 ewilts@galaxy.gov.bc.ca + - eliminated logging of each article processed. Only warning + messages (containing article ID) are generated **-- **/ ************** *** 485,491 else printf("\tControl: Ignored (SYS filter)\n"); } } ! printf("Add %s %s %s",recvfrom,itm[MESSAGE_ID],newsgroup); if (!strcmp(newsgroup,"junk") && !junk_it) { printf(": REJECT (/NOJUNK)\n"); return; --- 488,494 ----- else printf("\tControl: Ignored (SYS filter)\n"); } } ! /* printf("Add %s %s %s",recvfrom,itm[MESSAGE_ID],newsgroup); */ if (!strcmp(newsgroup,"junk") && !junk_it) { printf(": REJECT (/NOJUNK)\n"); return; ************** *** 492,498 } if (!*newsgroup) { if (!junk_it) { ! printf(": REJECT (No Newsgroup)\n"); return; } printf(": JUNK (No Newsgroup)"); --- 495,501 ----- } if (!*newsgroup) { if (!junk_it) { ! printf("%s %s: REJECT (No Newsgroup)\n",itm[MESSAGE_ID],newsgroup); return; } printf("%s %s: JUNK (No Newsgroup)\n",itm[MESSAGE_ID],newsgroup); ************** *** 495,501 printf(": REJECT (No Newsgroup)\n"); return; } ! printf(": JUNK (No Newsgroup)"); strcpy(newsgroup,junk); } if (!*itm[MESSAGE_ID]) { --- 498,504 ----- printf("%s %s: REJECT (No Newsgroup)\n",itm[MESSAGE_ID],newsgroup); return; } ! printf("%s %s: JUNK (No Newsgroup)\n",itm[MESSAGE_ID],newsgroup); strcpy(newsgroup,junk); } if (!*itm[MESSAGE_ID]) { ************** *** 499,505 strcpy(newsgroup,junk); } if (!*itm[MESSAGE_ID]) { ! printf(": REJECT (No Message-ID)\n"); return; } --- 502,508 ----- strcpy(newsgroup,junk); } if (!*itm[MESSAGE_ID]) { ! printf("%s %s: REJECT (Path Loop)\n",itm[MESSAGE_ID],newsgroup); return; } ************** *** 505,511 #if SELF_PATH_CHECK if (!skip_loop_test && !mod_add && path_match(itm[PATH],news_pathname)) { ! printf(": REJECT (Path Loop)\n"); return; } #endif --- 508,514 ----- #if SELF_PATH_CHECK if (!skip_loop_test && !mod_add && path_match(itm[PATH],news_pathname)) { ! printf("%s %s: JUNK (SYS filter)\n",itm[MESSAGE_ID],newsgroup); return; } #endif ************** *** 515,521 printf(": REJECT (SYS filter)\n"); return; } ! printf(": JUNK (SYS filter)"); strcpy(newsgroup,junk); } do_new_group(newsgroup,0,cre_grp); --- 518,524 ----- printf(": REJECT (SYS filter)\n"); return; } ! printf("%s %s: JUNK (SYS filter)\n",itm[MESSAGE_ID],newsgroup); strcpy(newsgroup,junk); } do_new_group(newsgroup,0,cre_grp); ************** *** 521,527 do_new_group(newsgroup,0,cre_grp); if ((!*cre_grp) && (strcmp(newsgroup,junk))) { if (!junk_it) { ! printf(": REJECT (No local Newsgroup match)\n"); return; } printf(": JUNK (No local Newsgroup match)"); --- 524,530 ----- do_new_group(newsgroup,0,cre_grp); if ((!*cre_grp) && (strcmp(newsgroup,junk))) { if (!junk_it) { ! printf("%s %s: REJECT (No local Newsgroup match)\n",itm[MESSAGE_ID],newsgroup); return; } printf("%s %s: JUNK (No local Newsgroup match)\n",itm[MESSAGE_ID],newsgroup); ************** *** 524,530 printf(": REJECT (No local Newsgroup match)\n"); return; } ! printf(": JUNK (No local Newsgroup match)"); strcpy(newsgroup,junk); do_new_group(newsgroup,0,cre_grp); } --- 527,533 ----- printf("%s %s: REJECT (No local Newsgroup match)\n",itm[MESSAGE_ID],newsgroup); return; } ! printf("%s %s: JUNK (No local Newsgroup match)\n",itm[MESSAGE_ID],newsgroup); strcpy(newsgroup,junk); do_new_group(newsgroup,0,cre_grp); } ************** *** 528,534 strcpy(newsgroup,junk); do_new_group(newsgroup,0,cre_grp); } ! if ((!*cre_grp) && (!strcmp(newsgroup,junk))) printf(": REJECT (No JUNK)"); *itm_fname = '\0'; status = 0; if (*cre_grp) { --- 531,537 ----- strcpy(newsgroup,junk); do_new_group(newsgroup,0,cre_grp); } ! if ((!*cre_grp) && (!strcmp(newsgroup,junk))) printf("%s %s: REJECT (No JUNK)\n",itm[MESSAGE_ID],newsgroup); *itm_fname = '\0'; status = 0; if (*cre_grp) { ************** *** 537,543 if (status != 0) { if ( (status == 0xb00184ec) || (status == 0xb0010001)) { ! printf(": REJECT (Duplicate - Cannot add Locally: Loop?)\n"); return; } else { --- 540,546 ----- if (status != 0) { if ( (status == 0xb00184ec) || (status == 0xb0010001)) { ! printf("%s %s: REJECT (Duplicate - Cannot add Locally: Loop?)\n",itm[MESSAGE_ID],newsgroup); return; } else { ************** *** 546,552 if (!*itm_fname && !fn && !(fn = create_article(NULL,NULL))) return; sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION], ((*itm_fname) ? itm_fname : fn),itm[MESSAGE_ID],!mod_add); ! printf(": REJECT (%s)\n",no_new_item); return; } printf(": JUNK (%s)\n",no_new_item); --- 549,555 ----- if (!*itm_fname && !fn && !(fn = create_article(NULL,NULL))) return; sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION], ((*itm_fname) ? itm_fname : fn),itm[MESSAGE_ID],!mod_add); ! printf("%s %s: REJECT (%s)\n",itm[MESSAGE_ID],newsgroup,no_new_item); return; } printf("%s %s%s %s: JUNK (%s)\n",itm[MESSAGE_ID],newsgroup,no_new_item); ************** *** 549,555 printf(": REJECT (%s)\n",no_new_item); return; } ! printf(": JUNK (%s)\n",no_new_item); mail_add_item(fn,junk,linecount,1); return; } --- 552,558 ----- printf("%s %s: REJECT (%s)\n",itm[MESSAGE_ID],newsgroup,no_new_item); return; } ! printf("%s %s: JUNK (%s)\n",itm[MESSAGE_ID],newsgroup,no_new_item); mail_add_item(fn,junk,linecount,1); return; } ************** *** 553,559 mail_add_item(fn,junk,linecount,1); return; } ! else printf(": REJECT (%s)",no_new_item); } } else if (*itm[SUPERSEDES]) { --- 556,562 ----- mail_add_item(fn,junk,linecount,1); return; } ! else printf("%s %s: REJECT (%s)\n",itm[MESSAGE_ID],newsgroup,no_new_item); } } else if (*itm[SUPERSEDES]) { ************** *** 583,589 chop_str(net_sender,'('); } if (!del_id(id,net_sender)) hist_add(id); ! printf(" (Supersedes %s)",itm[SUPERSEDES]); } strcpy(itm_fname,save_itm_fname); } --- 586,592 ----- chop_str(net_sender,'('); } if (!del_id(id,net_sender)) hist_add(id); ! printf("%s %s (Supersedes %s)\n",itm[MESSAGE_ID],newsgroup,itm[SUPERSEDES]); } strcpy(itm_fname,save_itm_fname); } ************** *** 594,600 if (!junk_it) { if (!fn && !(fn = create_article(NULL,NULL))) return; sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],fn,itm[MESSAGE_ID],!mod_add); ! printf(": REJECT\n"); return; } printf("\n"); --- 597,603 ----- if (!junk_it) { if (!fn && !(fn = create_article(NULL,NULL))) return; sys_remote_send(itm[PATH],itm[NEWSGROUPS],itm[DISTRIBUTION],fn,itm[MESSAGE_ID],!mod_add); ! printf("%s %s: REJECT\n",itm[MESSAGE_ID],newsgroup); return; } printf("\n"); ************** *** 602,608 return; } } ! printf("\n"); } /* --- 605,611 ----- return; } } ! /* printf("\n"); */ } /* ************** *** 1210,1216 return(printf("\tError: Add - Cannot read %s\n",fnam),0); fstat(fileno(fpr), &statb); ! printf("\nAdd - Reading file: %s (%d bytes)\n\n",fnam, statb.st_size); *add_inline = *look_ahead = '\0'; infile_eof = next_eof = n_stripping = 0; artbuf = malloc(ART_BUFSIZE); --- 1213,1219 ----- return(printf("\tError: Add - Cannot read %s\n",fnam),0); fstat(fileno(fpr), &statb); ! printf("Add - Reading file: %s (%d bytes)\n",fnam, statb.st_size); *add_inline = *look_ahead = '\0'; infile_eof = next_eof = n_stripping = 0; artbuf = malloc(ART_BUFSIZE); *** patchlist.h;-1 --- patchlist.h ************** *** 1,1 =+=+= End =+=+= --- 1,2 ----- + 920417_newsadd.c!ewilts@galaxy.gov.bc.ca =+=+= End =+=+=