Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Fri, 6 Apr 2001 10:06:42 -0400
From: Christopher Faylor <cgf@redhat.com>
To: Corinna Vinschen <cygwin@cygwin.com>
Subject: Re: sftp
Message-ID: <20010406100642.E17001@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: Corinna Vinschen <cygwin@cygwin.com>
References: <3ACB5353.E8C8F77B@gmx.de> <20010405105016.M956@cygbert.vinschen.de> <3ACC5F40.D064F813@gmx.de> <20010405170141.C4845@cygbert.vinschen.de> <3ACC9849.C40549C2@gmx.de> <20010405180557.P956@cygbert.vinschen.de> <3ACCA55C.6CD52904@gmx.de> <20010406083740.Z956@cygbert.vinschen.de> <3ACD86BC.E5B7794D@gmx.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <3ACD86BC.E5B7794D@gmx.de>; from ronald.hecht@gmx.de on Fri, Apr 06, 2001 at 11:05:00AM +0200

On Fri, Apr 06, 2001 at 11:05:00AM +0200, Ronald Hecht wrote:
>I tracked down the problem to the "(dp = readdir(dirp)) != NULL)"
>command in process_readdir of sftp-server.c. The readdir function seems
>to crash when it's called the second time. The main difference between
>the first time it's called and the second is the value of
>dirp->__d_dirent.__d_position. At the first time it's zero. The second
>time nonzero (actually the last position of the directory). I set it to
>zero, to see what happens and readdir is working correctly (lists the
>directory again).
>
>Hope, this helps a bit.

Did you look at the readdir code?  Setting __d_position to zero really doesn't
make sense in repeated readdir calls.  I don't think this is a useful debugging
point.  If you are able to debug things to this point, can't you figure out
exactly why it is core dumping?

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

