Subject: Re: ssh protocol flow diagram

Re: ssh protocol flow diagram

From: suyog jadhav <suyogjadhav_at_yahoo.com>
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: "libssh2-devel-request@cool.haxx.se" <libssh2-devel-request@cool.haxx.se> To: libssh2-devel@cool.haxx.se 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 libssh2-devel@cool.haxx.se To subscribe or unsubscribe via the World Wide Web, visit http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel or, via email, send a message with subject or body 'help' to libssh2-devel-request@cool.haxx.se You can reach the person managing the list at libssh2-devel-owner@cool.haxx.se 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 libssh2-devel@cool.haxx.se http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-04-11