Windows: conditionalize cm_Analyze timeLeft on SMB or RDR
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 3 Sep 2011 22:25:10 +0000 (18:25 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Sun, 4 Sep 2011 16:19:53 +0000 (09:19 -0700)
Restrict timeLeft in cm_Analyze() to SMB constraints only
when SMB mode is in use.

Change-Id: Iff37b90c1532fe9aa7d57567f4ff4e5e6877cb65
Reviewed-on: http://gerrit.openafs.org/5341
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_conn.c

index f6bce49..1461775 100644 (file)
@@ -285,7 +285,10 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
 
     /* timeleft - get it from reqp the same way as cm_ConnByMServers does */
     timeUsed = (GetTickCount() - reqp->startTime) / 1000;
-    timeLeft = HardDeadtimeout - timeUsed;
+    if ( reqp->flags & CM_REQ_SOURCE_SMB )
+        timeLeft = HardDeadtimeout - timeUsed;
+    else
+        timeLeft = 0x0FFFFFFF;
 
     /* get a pointer to the cell */
     if (errorCode) {