]> andersk Git - gssapi-openssh.git/blobdiff - openssh/ssh.c
fix check for _PATH_BSHELL, etc., from openssh patch
[gssapi-openssh.git] / openssh / ssh.c
index a7866d5acc393b224b51b836b7862805377ed184..6edb30f6a7feae9ee161355929acb59f547f3f48 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.293 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: ssh.c,v 1.294 2006/10/06 02:29:19 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1243,26 +1243,29 @@ ssh_session2_open(void)
        {
                if (options.hpn_buffer_size < 0)
                        options.hpn_buffer_size = BUFFER_MAX_LEN_HPN;
+
+               /*create a socket but don't connect it */
+               /* we use that the get the rcv socket size */
+               sock = socket(AF_INET, SOCK_STREAM, 0);
+               /* if they are using the tcp_rcv_buf option */
+               /* attempt to set the buffer size to that */
+               if (options.tcp_rcv_buf) 
+                       setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&options.tcp_rcv_buf, 
+                                  sizeof(options.tcp_rcv_buf));
+               getsockopt(sock, SOL_SOCKET, SO_RCVBUF, 
+                          &socksize, &socksizelen);
+               close(sock);
+               debug("socksize %d", socksize);
                if (options.tcp_rcv_buf_poll <= 0) 
                {
-                       /*create a socket but don't connect it */
-                       /* we use that the get the rcv socket size */
-                       sock = socket(AF_INET, SOCK_STREAM, 0);
-                       /* if they are using the tcp_rcv_buf option */
-                       /* attempt to set the buffer size to that */
-                       if (options.tcp_rcv_buf) 
-                               setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *)&options.tcp_rcv_buf, 
-                                          sizeof(options.tcp_rcv_buf));
-                       getsockopt(sock, SOL_SOCKET, SO_RCVBUF, 
-                                  &socksize, &socksizelen);
-                       close(sock);
-                       debug("socksize %d", socksize);
-                       options.hpn_buffer_size = MIN(socksize,options.hpn_buffer_size);                        
+                       options.hpn_buffer_size = MIN(socksize,options.hpn_buffer_size);
+                       debug ("MIN of TCP RWIN and HPNBufferSize: %d", options.hpn_buffer_size);
                } 
                else
                {
                        if (options.tcp_rcv_buf > 0) 
                                options.hpn_buffer_size = MIN(options.tcp_rcv_buf, options.hpn_buffer_size);
+                               debug ("MIN of TCPRcvBuf and HPNBufferSize: %d", options.hpn_buffer_size);
                }
                
        }
This page took 0.034279 seconds and 4 git commands to generate.