1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

Added compression options and allow "yes/no" setting

SSH_OPTION_COMPRESSION and SSH_OPTION_COMPRESSION_LEVEL options have been added. Now, end-level apps may simply choose to enable compression without knowing the relevant algorithms behind it.
This commit is contained in:
Aris Adamantiadis
2010-12-27 23:28:39 +01:00
parent 32c0e1c99a
commit 4fa2e4dde1
6 changed files with 72 additions and 21 deletions

View File

@@ -239,11 +239,9 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
i = ssh_config_get_yesno(&s, -1);
if (i >= 0 && *parsing) {
if (i) {
ssh_options_set(session, SSH_OPTIONS_COMPRESSION_C_S, "zlib@openssh.com,zlib,none");
ssh_options_set(session, SSH_OPTIONS_COMPRESSION_S_C, "zlib@openssh.com,zlib,none");
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "yes");
} else {
ssh_options_set(session, SSH_OPTIONS_COMPRESSION_C_S, "none");
ssh_options_set(session, SSH_OPTIONS_COMPRESSION_S_C, "none");
ssh_options_set(session, SSH_OPTIONS_COMPRESSION, "no");
}
}
break;