Subject: Re: ssh protocol flow diagram

Re: ssh protocol flow diagram

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 12 Apr 2011 10:47:11 +0200 (CEST)

On Tue, 12 Apr 2011, suyog jadhav wrote:

> I am using libssh2 1.2.4 version on RHEL 5.3 platform and recently using
> 1.2.7/8 to verify.

Great. 1.2.4 is rather old and we've fixed plenty bugs since that.

> However as previously asked,I would like to understand following excerpt
> from scp_write_nonblock.c
>
> rc = libssh2_channel_write(channel, ptr, nread);
>                 if(rc > nread) {
>                     fprintf(stderr, "MOO %d > %d\n", (int)rc, (int)nread);
>                 }

> In what scenarios rc would be greater than nread, is it error
> condition(MOO??), if yes how to handle it.

It can't happen. If it ever happens it would indicate a serious libssh2 bug.
I don't remember why the example code has that check, but I hve removed it
now!

-- 
  / daniel.haxx.se

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