[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.250 and 1.251

version 1.250, 2013/05/17 00:13:13 version 1.251, 2013/06/01 13:15:51
Line 265 
Line 265 
                 control_persist_exit_time = 0;                  control_persist_exit_time = 0;
         } else if (control_persist_exit_time <= 0) {          } else if (control_persist_exit_time <= 0) {
                 /* a client connection has recently closed */                  /* a client connection has recently closed */
                 control_persist_exit_time = time(NULL) +                  control_persist_exit_time = monotime() +
                         (time_t)options.control_persist_timeout;                          (time_t)options.control_persist_timeout;
                 debug2("%s: schedule exit in %d seconds", __func__,                  debug2("%s: schedule exit in %d seconds", __func__,
                     options.control_persist_timeout);                      options.control_persist_timeout);
Line 348 
Line 348 
                                 if (system(cmd) == 0)                                  if (system(cmd) == 0)
                                         generated = 1;                                          generated = 1;
                                 if (x11_refuse_time == 0) {                                  if (x11_refuse_time == 0) {
                                         now = time(NULL) + 1;                                          now = monotime() + 1;
                                         if (UINT_MAX - timeout < now)                                          if (UINT_MAX - timeout < now)
                                                 x11_refuse_time = UINT_MAX;                                                  x11_refuse_time = UINT_MAX;
                                         else                                          else
Line 573 
Line 573 
 {  {
         struct timeval tv, *tvp;          struct timeval tv, *tvp;
         int timeout_secs;          int timeout_secs;
         time_t minwait_secs = 0, server_alive_time = 0, now = time(NULL);          time_t minwait_secs = 0, server_alive_time = 0, now = monotime();
         int ret;          int ret;
   
         /* Add any selections by the channel mechanism. */          /* Add any selections by the channel mechanism. */
Line 668 
Line 668 
                  * Timeout.  Could have been either keepalive or rekeying.                   * Timeout.  Could have been either keepalive or rekeying.
                  * Keepalive we check here, rekeying is checked in clientloop.                   * Keepalive we check here, rekeying is checked in clientloop.
                  */                   */
                 if (server_alive_time != 0 && server_alive_time <= time(NULL))                  if (server_alive_time != 0 && server_alive_time <= monotime())
                         server_alive_check();                          server_alive_check();
         }          }
   
Line 1638 
Line 1638 
                  * connections, then quit.                   * connections, then quit.
                  */                   */
                 if (control_persist_exit_time > 0) {                  if (control_persist_exit_time > 0) {
                         if (time(NULL) >= control_persist_exit_time) {                          if (monotime() >= control_persist_exit_time) {
                                 debug("ControlPersist timeout expired");                                  debug("ControlPersist timeout expired");
                                 break;                                  break;
                         }                          }
Line 1856 
Line 1856 
                     "malicious server.");                      "malicious server.");
                 return NULL;                  return NULL;
         }          }
         if (x11_refuse_time != 0 && time(NULL) >= x11_refuse_time) {          if (x11_refuse_time != 0 && monotime() >= x11_refuse_time) {
                 verbose("Rejected X11 connection after ForwardX11Timeout "                  verbose("Rejected X11 connection after ForwardX11Timeout "
                     "expired");                      "expired");
                 return NULL;                  return NULL;

Legend:
Removed from v.1.250  
changed lines
  Added in v.1.251