[news.software.anu-news] strange NNTP behaviour

mark@comp.vuw.ac.nz (Mark Davies) (02/14/90)

Another anu news question from someone experiencing it from the outside.

We feed a VMS site via NNTP.  We recently switched the site here that we
feed them from but at the time of the switch had a largish backlog for them
on the old machine (call it host1) so let it continue feeding the backlog
up while normal communication went via the new machine (host2).  

Now the stuff sent by host1 did not have host2 in the path so the VMS site
queued up these messages to be sent to host2 -- fair enough, now the
strange part -- When sending the messages to host2 the VMS NNTP should do
an ihave <messageid> for each one and only send it if host2 hasn't already
seen the message.  In the above case host2 has already received all the
messages direct from host1 so none should actually be sent from the VMS
machine, however a large number, if not all, are being sent (only to be
rejected as duplicates when they are actually feed into the news system).

Has anyone else observed this? know how to stop it happening?

The vms machine is running ANU news 5.9c I think.  We are running
nntp1.5.7.

cheers
mark
--
 mark@comp.vuw.ac.nz    |
 ...!uunet!vuwcomp!mark |				DEV_BSIZE forever!

sloane@kuhub.cc.ukans.edu (Bob Sloane) (02/17/90)

In article <1990Feb14.010521.23324@kaukau.comp.vuw.ac.nz>,
 mark@comp.vuw.ac.nz (Mark Davies) writes:
..
> strange part -- When sending the messages to host2 the VMS NNTP should do
> an ihave <messageid> for each one and only send it if host2 hasn't already
> seen the message.

ANU News has an unfortunate habit of converting message ids to lower
case. This causes real problems when comunicating to the outside
world.  The following patch is a KLUDGE that I worked out to avoid the
problem. NOTE:  THIS IS NOT AN OFFICIAL PATCH AND DOES NOT ENTIRELY
FIX THE PROBLEM. I have been using it here at ku for some time now.
Use it at your own risk.  Hopefully, Geoff will be able to generate
a complete fix for the problem soon.
-- 
USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045
E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444 

$! ------------------ CUT HERE -----------------------
$ v='f$verify(f$trnlnm("SHARE_VERIFY"))'

$!
$! This archive created by VMS_SHARE Version 7.1-004  3-AUG-1989
$!   On 16-FEB-1990 10:32:44.72   By user SLOANE 
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! Acknowledgements to:
$!    James Gray       - Original VMS_SHARE
$!    Michael Bednarek - Original Concept and implementation
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. NEWSUTILITY.C_DIFF;1
$!
$set="set"
$set symbol/scope=(nolocal,noglobal)
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ if f$getsyi("version") .ges. "V4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ v=f$verify(v)
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete/nolog 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete/nolog 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");
buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff))
;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:=
ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x=
"V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;
IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE;
ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD);
EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3))));
ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o);
ENDPROCEDURE;Unpacker;EXIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create/nolog 'f'
X*** `091-.news`093newsutility.c
X--- `091-.news_src`093newsutility.c
X**************
X*** 596,601
X    unsigned int *gptr;
X    GRP_PTR gap = 0;
X    char xrefline`091250`093, ibuf`0911024`093, mod`091100`093, id_key`091ID
VLEN + 4`093;
X `032
X    status = 1;
X    *mod = '\0';
X--- 596,602 -----
X    unsigned int *gptr;
X    GRP_PTR gap = 0;
X    char xrefline`091250`093, ibuf`0911024`093, mod`091100`093, id_key`091ID
VLEN + 4`093;
X+   char l_id`091IDLEN+4`093;
X `032
X    status = 1;
X    *mod = '\0';
X**************
X*** 608,614
X      strcpy(no_new_item,"No message identifier string given");
X      return(0X20000000);
X      `125
X!   s_to_lower(id);
X `032
X    if (!*g) `123
X      strcpy(no_new_item,"No newsgroup index value specified");
X--- 609,617 -----
X      strcpy(no_new_item,"No message identifier string given");
X      return(0X20000000);
X      `125
X!   for (i=0; i<IDLEN+4; ++1)l_id = '\0';
X!   strncpy(l_id,id,IDLEN);
X!   s_to_lower(l_id);
X `032
X    if (!*g) `123
X      strcpy(no_new_item,"No newsgroup index value specified");
X**************
X*** 635,641
X      return(0X60000000);
X      `125
X    nosysprv();
X!   util_idcpy(id_key,id);
X `032
X    if ((!skip_history) && (hist_check(id_key))) `123
X      strcpy(no_new_item,"Cannot add to Newsitem index file");
X--- 638,644 -----
X      return(0X60000000);
X      `125
X    nosysprv();
X!   util_idcpy(id_key,l_id);
X `032
X    if ((!skip_history) && (hist_check(id_key))) `123
X      strcpy(no_new_item,"Cannot add to Newsitem index file");
X**************
X*** 652,658
X    newsitm.itm_life = mail_add_expiry;
X    newsitm.itm_cachedate = cur_time;
X    util_cpy(newsitm.itm_title,subj);
X!   util_idcpy(newsitm.itm_id,id);
X `032
X    itmrab.rab$b_krf = 1;
X    itmrab.rab$l_kbf = id_key;
X--- 655,661 -----
X    newsitm.itm_life = mail_add_expiry;
X    newsitm.itm_cachedate = cur_time;
X    util_cpy(newsitm.itm_title,subj);
X!   util_idcpy(newsitm.itm_id,l_id);
X `032
X    itmrab.rab$b_krf = 1;
X    itmrab.rab$l_kbf = id_key;
$ CALL UNPACK NEWSUTILITY.C_DIFF;1 1635718290
$ v=f$verify(v)
$ EXIT