mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
windows-vnovol-20080214
LICENSE MIT avoid a crash when logging VNOVOL errors returned from cm_CheckOfflineVolume
This commit is contained in:
parent
00bada9c5e
commit
1133cc4418
@ -432,15 +432,17 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
|
||||
break;
|
||||
}
|
||||
|
||||
/* Log server being offline for this volume */
|
||||
sprintf(addr, "%d.%d.%d.%d",
|
||||
((serverp->addr.sin_addr.s_addr & 0xff)),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff00)>> 8),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff0000)>> 16),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff000000)>> 24));
|
||||
if (serverp && fidp) {
|
||||
/* Log server being offline for this volume */
|
||||
sprintf(addr, "%d.%d.%d.%d",
|
||||
((serverp->addr.sin_addr.s_addr & 0xff)),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff00)>> 8),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff0000)>> 16),
|
||||
((serverp->addr.sin_addr.s_addr & 0xff000000)>> 24));
|
||||
|
||||
osi_Log2(afsd_logp, format, osi_LogSaveString(afsd_logp,addr), fidp->volume);
|
||||
LogEvent(EVENTLOG_WARNING_TYPE, msgID, addr, fidp->volume);
|
||||
osi_Log2(afsd_logp, format, osi_LogSaveString(afsd_logp,addr), fidp->volume);
|
||||
LogEvent(EVENTLOG_WARNING_TYPE, msgID, addr, fidp->volume);
|
||||
}
|
||||
|
||||
/* Mark server offline for this volume */
|
||||
if (!serversp && fidp) {
|
||||
@ -450,6 +452,7 @@ cm_Analyze(cm_conn_t *connp, cm_user_t *userp, cm_req_t *reqp,
|
||||
free_svr_list = 1;
|
||||
}
|
||||
}
|
||||
|
||||
lock_ObtainWrite(&cm_serverLock);
|
||||
for (tsrp = serversp; tsrp; tsrp=tsrp->next) {
|
||||
if (tsrp->server == serverp) {
|
||||
|
Loading…
Reference in New Issue
Block a user