Skip to content
Snippets Groups Projects
Commit 19613681 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Patch for release 1.7.0: fixed assertion in reshGetStatus to handle new...

Patch for release 1.7.0: fixed assertion in reshGetStatus to handle new allocations correctly. Credits to Thomas Jahns <jahns@dkrz.de>
parent e80484a6
No related branches found
No related tags found
No related merge requests found
......@@ -684,18 +684,21 @@ int reshGetStatus ( cdiResH resH, const resOps * ops )
nspT = namespaceResHDecode ( resH );
xassert ( nspT.nsp == nsp &&
nspT.idx >= 0 &&
nspT.idx < resHList[nsp].size );
listElem_t *listElem = resHList[nsp].resources + nspT.idx;
const resOps *elemOps = listElem->res.v.ops;
nspT.idx >= 0 );
int status;
if (nspT.idx < resHList[nsp].size) {
listElem_t *listElem = resHList[nsp].resources + nspT.idx;
const resOps *elemOps = listElem->res.v.ops;
xassert(listElem && (!(listElem->status & RESH_IN_USE_BIT) || elemOps == ops));
status = listElem->status;
} else {
status = RESH_UNUSED;
}
LIST_UNLOCK();
xassert(listElem && (!(listElem->status & RESH_IN_USE_BIT) || elemOps == ops));
return listElem->status;
return status;
}
/**************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment