Windows: Always compute time remaining in cm_Analyze
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 16 Oct 2009 19:28:04 +0000 (15:28 -0400)
committerJeffrey Altman <jaltman|account-1000011@unknown>
Sat, 17 Oct 2009 05:15:22 +0000 (22:15 -0700)
In cm_Analyze, the time remaining for processing the request
is used to determine if a retry should requested upon return.
If the request's CM_REQ_NORETRY flag is set, cm_Analyze can
still permit a retry if a new rx connection is to be forced.
This cannot happen if the time remaining is not calculated
when the CM_REQ_NORETRY flag is set.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/670
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_conn.c

index 6bc2bdf..c70c12a 100644 (file)
@@ -252,14 +252,9 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
     /* if timeout - check that it did not exceed the HardDead timeout
      * and retry */
     
-    /* timeleft - get if from reqp the same way as cmXonnByMServers does */
+    /* timeleft - get it from reqp the same way as cm_ConnByMServers does */
     timeUsed = (GetTickCount() - reqp->startTime) / 1000;
-           
-    /* leave 5 seconds margin for sleep */
-    if (reqp->flags & CM_REQ_NORETRY)
-        timeLeft = 0;
-    else
-        timeLeft = HardDeadtimeout - timeUsed;
+    timeLeft = HardDeadtimeout - timeUsed;
 
     /* get a pointer to the cell */
     if (errorCode) {