mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
windows-locking-error-codes-20051018
cm_Lock(), cm_RetryLock() should not interpret servers be unreachable as a sharing violation.
This commit is contained in:
parent
a923af2726
commit
9f0f50a2b1
@ -300,8 +300,19 @@ long cm_CheckOpen(cm_scache_t *scp, int openMode, int trunc, cm_user_t *userp,
|
||||
if (code == CM_ERROR_NOACCESS &&
|
||||
!(rights & PRSFS_WRITE))
|
||||
code = 0;
|
||||
else
|
||||
code = CM_ERROR_SHARING_VIOLATION;
|
||||
else {
|
||||
switch (code) {
|
||||
case CM_ERROR_ALLOFFLINE:
|
||||
case CM_ERROR_ALLDOWN:
|
||||
case CM_ERROR_ALLBUSY:
|
||||
case CM_ERROR_TIMEDOUT:
|
||||
case CM_ERROR_RETRY:
|
||||
case CM_ERROR_WOULDBLOCK:
|
||||
break;
|
||||
default:
|
||||
code = CM_ERROR_SHARING_VIOLATION;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -377,8 +388,19 @@ long cm_CheckNTOpen(cm_scache_t *scp, unsigned int desiredAccess,
|
||||
if (code == CM_ERROR_NOACCESS &&
|
||||
!(rights & PRSFS_WRITE))
|
||||
code = 0;
|
||||
else
|
||||
code = CM_ERROR_SHARING_VIOLATION;
|
||||
else {
|
||||
switch (code) {
|
||||
case CM_ERROR_ALLOFFLINE:
|
||||
case CM_ERROR_ALLDOWN:
|
||||
case CM_ERROR_ALLBUSY:
|
||||
case CM_ERROR_TIMEDOUT:
|
||||
case CM_ERROR_RETRY:
|
||||
case CM_ERROR_WOULDBLOCK:
|
||||
break;
|
||||
default:
|
||||
code = CM_ERROR_SHARING_VIOLATION;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user