Subject: Re: libssh2_sftp_write doesn't hang anymore

Re: libssh2_sftp_write doesn't hang anymore

From: Peter Stuge <peter_at_stuge.se>
Date: Sat, 13 Nov 2010 02:07:48 +0100

Mark Riordan wrote:
> > There's a buffer overrun error in libssh2 now. Am hunting it down.
>
> I appreciate it.

Have pushed a commit which I think may be sufficient to fix the problem.

> > Also, how did you generate trace.log? It has been corrupted
> > in a few places.
>
> I did this:
>
> int bitmask = ~0;
> libssh2_trace(session, bitmask);
>
> and then I just redirected standard error from the command line.

Some of the corruption (and indeed the last 11 error message) was
caused by the debug printout running over a buffer, and printing old
debug messages. That logic should be fixed, but there was also some
more corruption in the log which I don't really understand. Maybe it
is related to write() behavior on Windows. Let's see.. I also pushed
a patch to use fprintf() instead of write() for debugging. Maybe it
helps.

Please try latest git source.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-11-13