DEVEL15-windows-cm_analyze-ewouldblock-20071031
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 31 Oct 2007 15:21:42 +0000 (15:21 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 31 Oct 2007 15:21:42 +0000 (15:21 +0000)
Add support for EWOULDBLOCK to cm_Analyze.  If the file server returns
EWOULDBLOCK, retry the request every two seconds for up to the RDRtimeout.

(cherry picked from commit ff4c519c789af1c4b126d926dd94f3efab1ebd14)

src/WINNT/afsd/cm_conn.c

index a440d48..5546294 100644 (file)
@@ -236,7 +236,15 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
             cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, cellp);
             retry = 1;
         }
-    } 
+    }
+
+    else if (errorCode == UAEWOULDBLOCK || errorCode == EWOULDBLOCK ||
+              errorCode == UAEAGAIN || errorCode == EAGAIN) {
+        if (timeLeft > 5 ) {
+            thrd_Sleep(1000);
+            retry = 1;
+        }
+    }
 
     /* if there is nosuchvolume, then we have a situation in which a 
      * previously known volume no longer has a set of servers 
@@ -625,6 +633,8 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
            case UAENOENT          : s = "UAENOENT";           break;
            case VICECONNBAD       : s = "VICECONNBAD";        break;
            case VICETOKENDEAD     : s = "VICETOKENDEAD";      break;
+            case WSAEWOULDBLOCK    : s = "WSAEWOULDBLOCK";     break;
+            case UAEWOULDBLOCK     : s = "UAEWOULDBLOCK";      break;
            case CM_ERROR_NOSUCHCELL        : s = "CM_ERROR_NOSUCHCELL";         break;                         
            case CM_ERROR_NOSUCHVOLUME      : s = "CM_ERROR_NOSUCHVOLUME";       break;                         
            case CM_ERROR_TIMEDOUT          : s = "CM_ERROR_TIMEDOUT";           break;