Subject: RE: Bug in channel.c/channel_request_pty_size?

RE: Bug in channel.c/channel_request_pty_size?

From: Steve Legg <smlegg_at_googlemail.com>
Date: Fri, 31 Dec 2010 23:06:48 -0000

> On Fri, 31 Dec 2010, Steve Legg wrote:
>
> > Am I wrong, and there is actually a way for reqPTY_state to be set
> > back to idle? Or is this a real bug?
>
> It looks like a real bug to me!

Cool, thought so.
 
> > (it looks to me like the code has been written with asynchrony in
> > mind, but never actually finished - the reqPTY_state code appears to
> > be mostly redundant).
>
> Not entirely redundant since it avoids doing all that initing of the
> packet during situations when the transport layer returns
> LIBSSH2_ERROR_EAGAIN.

Ah yes, I didn't notice the BLOCK_ADJUST macro. I see how it works now (or
is supposed to work except in this case ;)

> How about fixing this bug with a patch like the attached?

Looks good to me - I'll give that a go later (I'm using it for an Android
project and building libssh2 means a trip through Linux for me [too hard to
get libssh2/openssl building with the android toolchain under windows ;] so
I'll give it a go tomorrow probably). Thanks!

Steve.

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