From:	MERC::"uunet!VM1.NODAK.EDU!OWNER-ANU-NEWS"  9-MAR-1993 16:26:04.26
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@VM1.NoDak.EDU>
CC:	
Subj:	Re: Access Violation when Invoking ANU News

In article <1993Mar5.145418.14574@decuac.dec.com>, spann@ftdetrck-mrdc2.army.mil
 writes:
> Hello,
>
> I am having a problem when I attempt to run ANU. I have version retreived
> version 61 beta 6 from kuhub.cc.ukans.edu and followed the installation
> instructions. I am configured to be a NNTP client only at this time. We also
> are running Wollongong's WIN/TCP version 5.2. We do have access to the NNTP
> server decuac.dec.com, because we are also evaluating FNEWS and it works.
>
> Here are the logical names that were define by running NEWS_STARTUP.COM ...
>
> [config info deleted]
>
> $ anu :== $ sys$common:[sysexe]news.exe
> $ anu
> Connecting to server @ decuac.dec.com (using TCP [WIN])
> Retrieving newsgroups:
> %SYSTEM-F-ACCVIO, access violation, reason mask=01, virtual address=01D605C0,
PC=0004F99D, PSL=03C00000
>
> [stack dump deleted]
>
> Any ideas would be appreciated.

The patch below should solve your problem.  As distributed, News 6.1beta6
incorporates some changes to the WIN/TCP address resolution code in
NewsRemClient.C which were necessary at one time for Ken Brucker and at least
one other site to use WIN/TCP.  I have never had this problem, and
conversations thus far with Mr. Brucker and Wollongong have not illuminated the
difference between our installations of what should be the same version of
WIN/TCP.  The bottom line is that, if you're using WIN/TCP, you should try
running without this patch, and, if News dies trying to connect to the server,
apply the patch and rebuild.  If I can sort out what's going on here, I'll
follow up with a more general answer.

I hope this helps.  Good luck.

                                        Charles Bailey

!-------------------------------------------------------------------------------
!             Dept. of Genetics / Howard Hughes Medical Institute
! University of Pennsylvania School of Medicine  Rm. 430 Clinical Research Bldg.
!     422 Curie Blvd.  Philadelphia, PA 19104 USA      Tel. (215) 898-1699
!          Internet: bailey@genetics.upenn.edu  (IN 128.91.200.37)
!-------------------------------------------------------------------------------

ANU News Patch
Patch ID: 930303_newsremclient.c!bailey@genetics.upenn.edu
Date: 03-Mar-1993
Author: Charles Bailey  bailey@genetics.upenn.edu
News Version: 6.1beta6
News Files: NewsRemClient.C
Description: removes changes made to WIN/TCP host address lookup in v6.1 by Ken
Brucker (kjb@calmasd.prime.com).  These changes work for him, but broke News on
my system.  We haven't been able to figure out what the difference is yet, so
you may or may not need to use this patch.
*** newsremclient.c
--- newsremclient_new.c
**************
*** 63,65
  **
  **  CONTRIBUTIONS:
  **      - Add support for Excelan - Pekka Kyt|laakso
--- 63,69 -----
+ **    V6.1b6   3-Mar-1993     bailey@genetics.upenn.edu
+ **      - removed changes made to 6.1 by kjb@calmasd.prime.com, since they
+ **         broke News under my version of WIN/TCP 5.2; the original code
+ **         works fine for me
  **
  **  CONTRIBUTIONS:
  **      - Add support for Excelan - Pekka Kyt|laakso
**************
*** 122,128
  #include <netdb.h>
  #include <in.h>
  #include <inetiodef.h>
! char *addr_pointer;             /* kjb@calmasd.prime.com */
  struct hostent *dest_host;
  struct sockaddr_in data_socket = {0};
  #endif
--- 129,136 -----
  #include <netdb.h>
  #include <in.h>
  #include <inetiodef.h>
! /* these mods break WIN/TCP 5.2 on my machine - bailey@genetics.upenn.edu */
! /* char *addr_pointer;             /_* kjb@calmasd.prime.com */
  struct hostent *dest_host;
  struct sockaddr_in data_socket = {0};
  #endif
**************
*** 471,476
          return(0);
          }
  /* the following uses 1 level of indirection :...
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
     whereas this assumes two :.. */

--- 479,488 -----
          return(0);
          }
  /* the following uses 1 level of indirection :...
+    ... and works with my version of WIN/TCP 5.2.  We haven't sorted out yet
+    what's different between mine and Ken Brucker's, so I've just commented
+    his mods out here.  YMMV.
+    Charles Bailey  bailey@genetics.upenn.edu  */
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
  /*   whereas this assumes two :..

**************
*** 472,478
          }
  /* the following uses 1 level of indirection :...
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
!    whereas this assumes two :.. */

          addr_pointer = *((u_long *) dest_host->h_addr); /*kjb@calmasd.prime.co
m*/
          data_socket.sin_addr.s_addr = *(u_long *) addr_pointer; /*kjb@calmasd.
prime.com*/
--- 484,490 -----
     his mods out here.  YMMV.
     Charles Bailey  bailey@genetics.upenn.edu  */
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
! /*   whereas this assumes two :..

          addr_pointer = *((u_long *) dest_host->h_addr); /_*kjb@calmasd.prime.c
om*_/
          data_socket.sin_addr.s_addr = *(u_long *) addr_pointer; /_*kjb@calmasd
.prime.com*_/
**************
*** 474,482
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
     whereas this assumes two :.. */

!         addr_pointer = *((u_long *) dest_host->h_addr); /*kjb@calmasd.prime.co
m*/
!         data_socket.sin_addr.s_addr = *(u_long *) addr_pointer; /*kjb@calmasd.
prime.com*/
!
          data_socket.sin_family = AF_INET;
          data_socket.sin_port = htons(NNTP_PORT);
          if (   (sys$qiow(0,net_chan,IO$_CONNECT,&read_iosb,0,0,&data_socket,si
zeof(data_socket),0,0,0,0) & 1)
--- 486,494 -----
          data_socket.sin_addr.s_addr = *((u_long *) dest_host->h_addr);
  /*   whereas this assumes two :..

!         addr_pointer = *((u_long *) dest_host->h_addr); /_*kjb@calmasd.prime.c
om*_/
!         data_socket.sin_addr.s_addr = *(u_long *) addr_pointer; /_*kjb@calmasd
.prime.com*_/
! */
          data_socket.sin_family = AF_INET;
          data_socket.sin_port = htons(NNTP_PORT);
          if (   (sys$qiow(0,net_chan,IO$_CONNECT,&read_iosb,0,0,&data_socket,si
zeof(data_socket),0,0,0,0) & 1)
*** patchlist.h;-1
--- patchlist.h
**************
*** 1,1
  =+=+= End =+=+=
--- 1,2 -----
+ 930303_newsremclient.c!bailey@genetics.upenn.edu
  =+=+= End =+=+=
