Bugs item #2885133, was opened at 2009-10-23 16:49 Message generated for change (Tracker Item Submitted) made by dseanrussell You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2885133&group_id=125852
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: David Russell (dseanrussell) Assigned to: Nobody/Anonymous (nobody) Summary: _libssh2_channel_write returns erroneous value Initial Comment: _libssh2_channel_write is not returning correct data under the following circumstances: - buflen is larger than the current local window size, so channel->write_bufwrite is reduced to channel->local.window_size. - The first chunk of the block is successfully written, so buflen, buf, and channel->write_bufwrote are updated correctly. - When the second chunk of the block is to be written, there is apparenly new room in the local window, so the new data is copied to the packet and _libssh2_transport_write is called. - _libssh2_transport_write fails with PACKET_EAGAIN, which is returned. - The write is retried, and finally succeeds. The 'wrote' value is returned, which only contains the amount of the second chunk of the original write. I believe that this function should return channel->write_bufwrote, not wrote. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2885133&group_id=125852 _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
