delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/12/31/16:26:27

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Fri, 31 Dec 1999 16:32:40 -0500 (EST)
From: "Steven N. Hirsch" <shirsch AT adelphia DOT net>
X-Sender: hirsch AT pii DOT fast DOT net
To: Trevor <trevorforbes AT ozemail DOT com DOT au>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: Problem building CVS-1.10.x
In-Reply-To: <004a01bf533a$781a2090$0200a8c0@VOYAGER>
Message-ID: <Pine.LNX.4.10.9912311557560.10602-100000@pii.fast.net>
MIME-Version: 1.0
Note-from-DJ: This may be spam

Trevor, et al,

I found out what was causing the problem with CVS.  My NT machine has the
Aventail Connect VPN client installed on it (required to access internal
systems at work via the internet).  Connect is resident as a "primary
service provider" in NT, so it is automatically loaded by winsock when CVS
connects to the server.  In theory, it examines the destination IP address
of outgoing traffic to determine whether redirection is applied.
Addresses on my own private network are not in the redirection list, so I
never considered it as a potential issue.

For whatever reason, it causes the Cygwin runtime to malfunction.  In
client.c the following happens:

- Connection is made to the server by opening socket fd's and exchanging
authentication using send() and recv() calls.  This works fine.

- Input and output streams are created by fdopen() on the file
descriptors.

- The client stores outgoing information in a buffer using
send_to_server().

- At line 4374 of start_server() (client.c), get_server_responses() is
invoked to listen back (note that the data has not been transmitted yet!).

- get_server_responses() calls read_line().

- read_line() calls buf_flush() (buffer.c).

- buf_flush() calls buf_send_output() to write buffered data to the stream
using fwrite().  So far, so good.

- When buf_send_output() returns (line 346 of buffer.c), an indirect call
is made to stdio_buffer_flush() to fflush() the FILE *.  

Here's where things go bad:  Unless I tell Aventail not to interact at all
with cvs, this call fails with errno 22 (EINVAL) - triggering the
"..invalid argument" message.  Again, since CVS had opened a socket to a
local machine, I'm not sure why this is necessary at all.

Naturally, when I need to access a CVS server on the other side of the VPN
tunnel, cvs.exe must be removed from the ignored application list.  An
annoying extra step.

There's a bug here somewhere, and it's probably with Aventail's DLLs.
Nonetheless, someone familiar with Cygwin library internals might want to
take a quick look at it.  

Steve



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019