- fixed a bug involving server / client channel assignments

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@50 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2009-10-16 03:37:24 +00:00
parent 65119f79d7
commit 1284a0d7d8
2 changed files with 16 additions and 14 deletions

View File

@ -48,7 +48,7 @@
* @author Jim Wigginton <terrafrost@php.net>
* @copyright MMIX Jim Wigginton
* @license http://www.gnu.org/licenses/lgpl.txt
* @version $Id: SFTP.php,v 1.8 2009-09-17 03:19:20 terrafrost Exp $
* @version $Id: SFTP.php,v 1.9 2009-10-16 03:37:24 terrafrost Exp $
* @link http://phpseclib.sourceforge.net
*/
@ -123,17 +123,6 @@ class Net_SFTP extends Net_SSH2 {
*/
var $window_size = 0x7FFFFFFF;
/**
* The Client Channel
*
* Net_SSH2::exec() uses 0
*
* @var Integer
* @see Net_SSH2::exec()
* @access private
*/
var $client_channel = 1;
/**
* Packet Size
*
@ -335,7 +324,7 @@ class Net_SFTP extends Net_SSH2 {
case NET_SSH2_MSG_CHANNEL_OPEN_CONFIRMATION:
$this->_string_shift($response, 4); // skip over client channel
list(, $server_channel) = unpack('N', $this->_string_shift($response, 4));
$this->server_channels[$client_channel] = $server_channel;
$this->server_channels[$this->client_channel] = $server_channel;
$this->_string_shift($response, 4); // skip over (server) window size
list(, $this->packet_size_client_to_server) = unpack('N', $this->_string_shift($response, 4));
break;

View File

@ -41,7 +41,7 @@
* @author Jim Wigginton <terrafrost@php.net>
* @copyright MMVII Jim Wigginton
* @license http://www.gnu.org/licenses/lgpl.txt
* @version $Id: SSH2.php,v 1.22 2009-09-18 20:14:16 terrafrost Exp $
* @version $Id: SSH2.php,v 1.23 2009-10-16 03:37:24 terrafrost Exp $
* @link http://phpseclib.sourceforge.net
*/
@ -414,6 +414,19 @@ class Net_SSH2 {
*/
var $get_seq_no = 0;
/**
* The Client Channel
*
* Net_SSH2::exec() uses 0, although since Net_SSH2::exec() doesn't send NET_SSH2_CHANNEL_DATA packets,
* Net_SSH2::_send_channel_packet() isn't actually called by any function in Net/SSH2.php. Classes that
* extend Net_SSH2, however, might call that function, hence it's existence.
*
* @var Integer
* @see Net_SSH2::_send_channel_packet
* @access private
*/
var $client_channel = 1;
/**
* Server Channels
*