From ff4c519c789af1c4b126d926dd94f3efab1ebd14 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 31 Oct 2007 15:20:14 +0000 Subject: [PATCH] windows-cm_analyze-ewouldblock-20071031 Add support for EWOULDBLOCK to cm_Analyze. If the file server returns EWOULDBLOCK, retry the request every two seconds for up to the RDRtimeout. --- src/WINNT/afsd/cm_conn.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_conn.c b/src/WINNT/afsd/cm_conn.c index 2b3d52cf2..e50e143b7 100644 --- a/src/WINNT/afsd/cm_conn.c +++ b/src/WINNT/afsd/cm_conn.c @@ -225,7 +225,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 @@ -596,6 +604,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; -- 2.39.5