[Ssh-sftp-perl-users] Bug with Net::SSH::Perl::SSH2::cmd in version 1.35
Brought to you by:
dbrobins
From: Colin W. <la...@gm...> - 2013-03-05 00:31:00
|
So this took me a while to figure out, and now that I have I'm not sure how to fix it. I've got an ssh server that's returning a window size of 0 in the SSH2_MSG_CHANNEL_OPEN_CONFIRMATION packet, and then following it up with a SSH2_MSG_CHANNEL_WINDOW_ADJUST. Since cmd attaches a handler to the confirmation, though, it tries to send the command before the remote window is big enough. I've got a couple of ideas of how to fix this, but I'm open to other suggestions: * Add some sort of message queue to the channel object, which will clear anything out when it gets a window adjust message. * Attach a new handler to window adjust to send the message out when that message is received. Neither seems like a great option, but I'm not sure I see any other ways. I'm willing to do the development work, I just need a little guidance from somebody who understands the design a little better than I do. Colin |