Subject: Re: ssh protocol flow diagram

Re: ssh protocol flow diagram

From: suyog jadhav <>
Date: Mon, 11 Apr 2011 09:22:17 +0530 (IST)

Hi, In the example scp_write_nonblock.c do { while ((rc = libssh2_channel_write(channel, ptr, nread)) == LIBSSH2_ERROR_EAGAIN) { waitsocket(sock, session); prev = 0; } if (rc < 0) { fprintf(stderr, "ERROR %d total %ld / %d prev %d\n", rc, total, (int)nread, (int)prev); break; } else { prev = nread; if(rc > nread) { fprintf(stderr, "MOO %d > %d\n", (int)rc, (int)nread); } /* rc indicates how many bytes were written this time */ nread -= rc; ptr += rc; } } while (nread); In what case, this condition would occur (rc > nread), is it error ,if yes how should it be handled, becoz I am getting this (rc > nread) in some cases and after that libssh2_channel_write always returns 0, eventually hanging the process. Regards suyog ________________________________ From: "" <> To: Sent: Sun, 10 April, 2011 3:30:03 PM Subject: libssh2-devel Digest, Vol 23, Issue 6 Note: Forwarded message is attached. Send libssh2-devel mailing list submissions to To subscribe or unsubscribe via the World Wide Web, visit or, via email, send a message with subject or body 'help' to You can reach the person managing the list at When replying, please edit your Subject line so it is more specific than "Re: Contents of libssh2-devel digest..." Today's Topics: 1. Re: ssh protocol flow diagram (Daniel Stenberg) (suyog jadhav) 2. Keyboard Interactive (Robert M. M?nch) 3. Re: Keyboard Interactive (Peter Stuge) _______________________________________________ libssh2-devel mailing list

Received on 2011-04-11