]> andersk Git - gssapi-openssh.git/blobdiff - openssh/sshconnect.c
Fix typo. http://bugzilla.ncsa.uiuc.edu/show_bug.cgi?id=374
[gssapi-openssh.git] / openssh / sshconnect.c
index e96f02639252569a943fe7decdceb284b28292b4..8a6932caf93a153507af44eacbb6b5f58020166d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect.c,v 1.199 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: sshconnect.c,v 1.200 2006/10/10 10:12:45 markus Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -222,8 +222,8 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
        
                if (options.tcp_rcv_buf > 0)
                        ssh_set_socket_recvbuf(sock);
-       
-               /* Bind the socket to an alternative local IP address */
+
+       /* Bind the socket to an alternative local IP address */
        if (options.bind_address == NULL)
                return sock;
 
@@ -355,9 +355,11 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
                    gai_strerror(gaierr));
 
        for (attempt = 0; attempt < connection_attempts; attempt++) {
-               if (attempt > 0)
+               if (attempt > 0) {
+                       /* Sleep a moment before retrying. */
+                       sleep(1);
                        debug("Trying again...");
-
+               }
                /*
                 * Loop through addresses for this host, and try each one in
                 * sequence until the connection succeeds.
@@ -394,9 +396,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
                }
                if (sock != -1)
                        break;  /* Successful connection. */
-
-               /* Sleep a moment before retrying. */
-               sleep(1);
        }
 
        freeaddrinfo(aitop);
This page took 0.035111 seconds and 4 git commands to generate.