[BACK]Return to clientloop.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/clientloop.c between version 1.248 and 1.249

version 1.248, 2013/01/02 00:32:07 version 1.249, 2013/05/16 02:00:34
Line 575 
Line 575 
 {  {
         struct timeval tv, *tvp;          struct timeval tv, *tvp;
         int timeout_secs;          int timeout_secs;
         time_t minwait_secs = 0;          time_t minwait_secs = 0, server_alive_time = 0, now = time(NULL);
         int ret;          int ret;
   
         /* Add any selections by the channel mechanism. */          /* Add any selections by the channel mechanism. */
Line 624 
Line 624 
          */           */
   
         timeout_secs = INT_MAX; /* we use INT_MAX to mean no timeout */          timeout_secs = INT_MAX; /* we use INT_MAX to mean no timeout */
         if (options.server_alive_interval > 0 && compat20)          if (options.server_alive_interval > 0 && compat20) {
                 timeout_secs = options.server_alive_interval;                  timeout_secs = options.server_alive_interval;
                   server_alive_time = now + options.server_alive_interval;
           }
           if (options.rekey_interval > 0 && compat20 && !rekeying)
                   timeout_secs = MIN(timeout_secs, packet_get_rekey_timeout());
         set_control_persist_exit_time();          set_control_persist_exit_time();
         if (control_persist_exit_time > 0) {          if (control_persist_exit_time > 0) {
                 timeout_secs = MIN(timeout_secs,                  timeout_secs = MIN(timeout_secs,
                         control_persist_exit_time - time(NULL));                          control_persist_exit_time - now);
                 if (timeout_secs < 0)                  if (timeout_secs < 0)
                         timeout_secs = 0;                          timeout_secs = 0;
         }          }
Line 661 
Line 665 
                 snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno));                  snprintf(buf, sizeof buf, "select: %s\r\n", strerror(errno));
                 buffer_append(&stderr_buffer, buf, strlen(buf));                  buffer_append(&stderr_buffer, buf, strlen(buf));
                 quit_pending = 1;                  quit_pending = 1;
         } else if (ret == 0)          } else if (ret == 0) {
                 server_alive_check();                  /*
                    * Timeout.  Could have been either keepalive or rekeying.
                    * Keepalive we check here, rekeying is checked in clientloop.
                    */
                   if (server_alive_time != 0 && server_alive_time <= time(NULL))
                           server_alive_check();
           }
   
 }  }
   
 static void  static void

Legend:
Removed from v.1.248  
changed lines
  Added in v.1.249