1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-26 20:24:39 +01:00

SSH/SFTP: more adustments to channel handling

This commit is contained in:
terrafrost 2017-11-23 09:31:34 -06:00
parent b50dde76f5
commit 309fa0af44
2 changed files with 6 additions and 6 deletions

View File

@ -478,7 +478,7 @@ class Net_SFTP extends Net_SSH2
$this->channel_status[NET_SFTP_CHANNEL] = NET_SSH2_MSG_CHANNEL_OPEN;
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL);
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if ($response === false) {
return false;
}
@ -499,7 +499,7 @@ class Net_SFTP extends Net_SSH2
$this->channel_status[NET_SFTP_CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL);
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if ($response === false) {
// from PuTTY's psftp.exe
$command = "test -x /usr/lib/sftp-server && exec /usr/lib/sftp-server\n" .
@ -523,7 +523,7 @@ class Net_SFTP extends Net_SSH2
$this->channel_status[NET_SFTP_CHANNEL] = NET_SSH2_MSG_CHANNEL_REQUEST;
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL);
$response = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if ($response === false) {
return false;
}
@ -3027,7 +3027,7 @@ class Net_SFTP extends Net_SSH2
// SFTP packet length
while (strlen($this->packet_buffer) < 4) {
$temp = $this->_get_channel_packet(NET_SFTP_CHANNEL);
$temp = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if (is_bool($temp)) {
$this->packet_type = false;
$this->packet_buffer = '';
@ -3044,7 +3044,7 @@ class Net_SFTP extends Net_SSH2
// SFTP packet type and data payload
while ($tempLength > 0) {
$temp = $this->_get_channel_packet(NET_SFTP_CHANNEL);
$temp = $this->_get_channel_packet(NET_SFTP_CHANNEL, true);
if (is_bool($temp)) {
$this->packet_type = false;
$this->packet_buffer = '';

View File

@ -3740,7 +3740,7 @@ class Net_SSH2
$data = $this->_string_shift($response, $length);
$this->stdErrorLog.= $data;
if ($skip_extended || $this->quiet_mode) {
break;
continue;
}
if ($client_channel == $channel && $this->channel_status[$channel] == NET_SSH2_MSG_CHANNEL_DATA) {
return $data;