aboutsummaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-10-04 16:19:20 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-10-04 16:19:20 +0200
commitda9cd2e64d3a2e884a29fccdacf885468048f445 (patch)
tree3f9a387e49379eb50d624dd6c58141b36f4cf1cd /src/server.c
parent5d1636985bd64c0499d9af120622ae7c2bdd83ca (diff)
downloadlibssh-da9cd2e64d3a2e884a29fccdacf885468048f445.tar.gz
libssh-da9cd2e64d3a2e884a29fccdacf885468048f445.tar.xz
libssh-da9cd2e64d3a2e884a29fccdacf885468048f445.zip
Implemented zlib@openssh.com compression
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/server.c b/src/server.c
index b6e082c4..c1f68718 100644
--- a/src/server.c
+++ b/src/server.c
@@ -1015,7 +1015,9 @@ int ssh_message_auth_set_methods(ssh_message msg, int methods) {
}
int ssh_message_auth_reply_success(ssh_message msg, int partial) {
- if (msg == NULL) {
+ int r;
+
+ if (msg == NULL) {
return SSH_ERROR;
}
@@ -1027,7 +1029,16 @@ int ssh_message_auth_reply_success(ssh_message msg, int partial) {
return SSH_ERROR;
}
- return packet_send(msg->session);
+ r = packet_send(msg->session);
+ if(msg->session->current_crypto && msg->session->current_crypto->delayed_compress_out){
+ ssh_log(msg->session,SSH_LOG_PROTOCOL,"Enabling delayed compression OUT");
+ msg->session->current_crypto->do_compress_out=1;
+ }
+ if(msg->session->current_crypto && msg->session->current_crypto->delayed_compress_in){
+ ssh_log(msg->session,SSH_LOG_PROTOCOL,"Enabling delayed compression IN");
+ msg->session->current_crypto->do_compress_in=1;
+ }
+ return r;
}
/* Answer OK to a pubkey auth request */