www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: [libssh2] code hangs with sftp downloads, solved

Re: [libssh2] code hangs with sftp downloads, solved

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 12 Sep 2008 21:22:04 +0200

2008/9/12, E L <crc1021_at_gmail.com> wrote:

> The libssh2 code is not getting the real socket errors in most cases.
> After calling send() or recv(), it is assuming errno will be set, but
> Windows does not set errno for socket functions. If the connection
> gets reset, the call to send() or recv() will fail, but there is a
> good chance errno will still be set to EAGAIN, so the code will keep
> trying indefinititely.

Yes the real problem is that errno is not being cleared for WIN32 if
the call to recv() or send() succeeds!

> patch is included below to set errno for all send() and recv()

Your patch was real close, but it doesn't address the above statement.

Could you verify if the attached patch works fine for you, and report
back to the list, so that someone might commit it to CVS ?


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world

libssh2-devel mailing list

Received on 2008-09-12

the libssh2 team