E L,
I just checked in a change that should fix this issue in the latest CVS
version. Please update your code to the latest CVS and let me know if you
still encounter this issue. I would have messed with it sooner, but I had
two different family members get married this month!
Paul
On Mon, Oct 20, 2008 at 1:22 PM, Paul Thomas <[EMAIL PROTECTED]> wrote:
> That patch that I added that changed the line you are referring to was done
> to fix an issue where small amounts of data weren't getting picked up on the
> channel_read when it only recieved 1~8 chars of data. Looks like I forgot a
> case dealing with the while loop on line 1533.
>
> I took a quick look....That if statement needs to take into account when
> the condition
> channel->read_bytes_read == (int) buflen
> is true and if so, also enter the error state. That's why you're seeing the
> code get stuck in the loop.
>
> Paul
>
>
>
> On Mon, Oct 20, 2008 at 12:47 PM, E L <[EMAIL PROTECTED]> wrote:
>
>> There was change in libssh2_channel_read_ex, in the check of rc < 0
>> if (channel->read_block) {
>> /* in the second lap and onwards, do this */
>> rc = libssh2_packet_read(session);
>> channel->read_packet = session->packets.head;
>> }
>>
>> /* We didn't read any data from the socket and
>> * no packets are waiting to be read */
>> if ((rc < 0) && (! channel->read_packet)) {
>> if (rc != PACKET_EAGAIN) {
>> channel->read_state = libssh2_NB_state_idle;
>> }
>> /* no packets available */
>> return rc;
>> }
>>
>> This is causing problems for me, the code appears to spin in some busy
>> wait loop.
>>
>> This issue is that rc == LIBSSH2_ERROR_EAGAIN and
>> session->packets.head is not NULL, so the error checking code is not
>> entered. Reverting that line by removing the "&& (!
>> channel->read_packet)", make the code work again.
>>
>> Code is from libssh2-0.19.0-20081020, compiled with mingw on win XP,
>> and used in libcurl.
>>
>> -------------------------------------------------------------------------
>> 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
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> libssh2-devel mailing list
>> libssh2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/libssh2-devel
>>
>
>
-------------------------------------------------------------------------
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
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel