/* special codes: missing volumes */
if (errorCode == VNOVOL || errorCode == VMOVED || errorCode == VOFFLINE
|| errorCode == VSALVAGE || errorCode == VNOSERVICE) {
- long newSum;
- int same;
-
/* Log server being offline for this volume */
osi_Log4(afsd_logp, "cm_Analyze found server %d.%d.%d.%d marked offline for a volume",
((serverp->addr.sin_addr.s_addr & 0xff)),
cm_serverRef_t *tsrp;
cm_server_t *tsp;
long firstError = 0;
- int someBusy = 0, someOffline = 0;
+ int someBusy = 0, someOffline = 0, allDown = 1;
long timeUsed, timeLeft, hardTimeLeft;
#ifdef DJGPP
struct timeval now;
tsp->refCount++;
lock_ReleaseWrite(&cm_serverLock);
if (!(tsp->flags & CM_SERVERFLAG_DOWN)) {
+ allDown = 0;
if (tsrp->status == busy)
someBusy = 1;
else if (tsrp->status == offline)
if (firstError == 0)
firstError = code;
}
- }
+ }
lock_ObtainWrite(&cm_serverLock);
osi_assert(tsp->refCount-- > 0);
}
lock_ReleaseWrite(&cm_serverLock);
if (firstError == 0) {
- if (someBusy) firstError = CM_ERROR_ALLBUSY;
- else if (someOffline) firstError = CM_ERROR_ALLOFFLINE;
- else if (serversp) firstError = CM_ERROR_TIMEDOUT;
+ if (someBusy)
+ firstError = CM_ERROR_ALLBUSY;
+ else if (someOffline)
+ firstError = CM_ERROR_ALLOFFLINE;
+ else if (!allDown && serversp)
+ firstError = CM_ERROR_TIMEDOUT;
/* Only return CM_ERROR_NOSUCHVOLUME if there are no
servers for this volume */
- else firstError = CM_ERROR_NOSUCHVOLUME;
+ else
+ firstError = CM_ERROR_NOSUCHVOLUME;
}
osi_Log1(afsd_logp, "cm_ConnByMServers returning %x", firstError);
return firstError;
NTStatus = 0xC000000FL; /* No such file */
}
else if (code == CM_ERROR_TIMEDOUT) {
- NTStatus = 0xC00000CFL; /* Paused */
+ NTStatus = 0xC00000CFL; /* Sharing Paused */
}
else if (code == CM_ERROR_RETRY) {
NTStatus = 0xC000022DL; /* Retry */
NTStatus = 0xC00000CCL; /* Bad network name */
}
else if (code == CM_ERROR_NOIPC) {
+#ifdef COMMENT
NTStatus = 0xC0000022L; /* Access Denied */
+#else
+ NTStatus = 0xC000013DL; /* Remote Resources */
+#endif
}
else if (code == CM_ERROR_CLOCKSKEW) {
NTStatus = 0xC0000133L; /* Time difference at DC */