]> andersk Git - gssapi-openssh.git/blobdiff - openssh/clientloop.c
merge hpn12v17
[gssapi-openssh.git] / openssh / clientloop.c
index 2f7ce2b51e86b7a31e27c53829b787ad2ebbc5e1..ac87de57308cb2fcf468becdb090bf5308636e84 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.176 2006/10/11 12:38:03 markus Exp $ */
+/* $OpenBSD: clientloop.c,v 1.178 2007/02/20 10:25:14 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -707,7 +707,7 @@ client_process_control(fd_set *readset)
 {
        Buffer m;
        Channel *c;
-       int client_fd, new_fd[3], ver, allowed;
+       int client_fd, new_fd[3], ver, allowed, window, packetmax;
        socklen_t addrlen;
        struct sockaddr_storage addr;
        struct confirm_ctx *cctx;
@@ -937,15 +937,19 @@ client_process_control(fd_set *readset)
        set_nonblock(client_fd);
 
        if (options.hpn_disabled) 
-               c = channel_new("session", SSH_CHANNEL_OPENING,
-                   new_fd[0], new_fd[1], new_fd[2],
-                   CHAN_SES_WINDOW_DEFAULT, CHAN_SES_PACKET_DEFAULT,
-                   CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
-       else 
-               c = channel_new("session", SSH_CHANNEL_OPENING,
-                   new_fd[0], new_fd[1], new_fd[2],
-                   options.hpn_buffer_size, CHAN_SES_PACKET_DEFAULT,
-                   CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
+         window = options.hpn_buffer_size;
+       else
+         window = CHAN_SES_WINDOW_DEFAULT;
+       packetmax = CHAN_SES_PACKET_DEFAULT;
+       if (cctx->want_tty) {
+               window >>= 1;
+               packetmax >>= 1;
+       }
+
+       c = channel_new("session", SSH_CHANNEL_OPENING,
+           new_fd[0], new_fd[1], new_fd[2], window, packetmax,
+           CHAN_EXTENDED_WRITE, "client-session", /*nonblock*/0);
+
        /* XXX */
        c->ctl_fd = client_fd;
 
@@ -1810,7 +1814,7 @@ client_request_agent(const char *request_type, int rchan)
                error("Warning: this is probably a break-in attempt by a malicious server.");
                return NULL;
        }
-       sock =  ssh_get_authentication_socket();
+       sock = ssh_get_authentication_socket();
        if (sock < 0)
                return NULL;
        if (options.hpn_disabled) 
This page took 0.03332 seconds and 4 git commands to generate.