diff options
author | Olle Lundberg <geek@nerd.sh> | 2014-08-14 15:25:44 +0200 |
---|---|---|
committer | Olle Lundberg <geek@nerd.sh> | 2014-08-14 16:36:04 +0200 |
commit | b0ffd7c9c8d0941ee95e6f133cb6697bfb6a9b99 (patch) | |
tree | 9c9635b66735fed0f201635fd18fbb79bc792bac | |
parent | 83aa7335f7121f9259a41ae27cab5fb8dad09b96 (diff) |
Use the new packet sanitize method in channel.
-rw-r--r-- | paramiko/channel.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py index d6ad1a52..0042ab15 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -30,7 +30,7 @@ from paramiko import util from paramiko.common import cMSG_CHANNEL_REQUEST, cMSG_CHANNEL_WINDOW_ADJUST, \ cMSG_CHANNEL_DATA, cMSG_CHANNEL_EXTENDED_DATA, DEBUG, ERROR, \ cMSG_CHANNEL_SUCCESS, cMSG_CHANNEL_FAILURE, cMSG_CHANNEL_EOF, \ - cMSG_CHANNEL_CLOSE, MIN_PACKET_SIZE + cMSG_CHANNEL_CLOSE from paramiko.message import Message from paramiko.py3compat import bytes_types from paramiko.ssh_exception import SSHException @@ -899,7 +899,8 @@ class Channel (object): def _set_remote_channel(self, chanid, window_size, max_packet_size): self.remote_chanid = chanid self.out_window_size = window_size - self.out_max_packet_size = max(max_packet_size, MIN_PACKET_SIZE) + self.out_max_packet_size = self.transport. \ + _sanitize_packet_size(max_packet_size) self.active = 1 self._log(DEBUG, 'Max packet out: %d bytes' % max_packet_size) |