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

Archive Index This month's Index

Subject: [libssh2] #158: libssh2_sftp_write returns incorrect value

[libssh2] #158: libssh2_sftp_write returns incorrect value

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Thu, 18 Feb 2010 21:29:44 -0000

#158: libssh2_sftp_write returns incorrect value
 Reporter: mstrsn | Owner:
     Type: defect | Status: new
 Priority: normal | Milestone:
Component: SFTP | Version: 1.2.4
 Keywords: | Blocking:
Blockedby: |
 The function libssh2_sftp_write incorrectly returns
 LIBSSH2_ERROR_SOCKET_SEND when there is no room on the server. I believe
 the function should either block until there is room on the server, or it
 should return LIBSSH2_ERROR_EAGAIN.

 The following patch works for me, but that's just because I'm only worried
 about non-blocking mode. Someone more knowledgeable with the code should
 implement the proper fix:

 diff sftp.c
> if(channel->local.window_size == 0) {
> }


Ticket URL: <http://libssh2.stuge.se/ticket/158>
libssh2 <http://libssh2.stuge.se/>
C library for writing portable SSH2 clients
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-18

the libssh2 team