Skip to content
Snippets Groups Projects
Commit 94371d86 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdiInqContents: missing lock of non thread-safe netCDF4/HDF5 calls (bug fix)

parent 7ef2784a
No related branches found
No related tags found
1 merge request!85M214003/develop
Pipeline #68313 passed
2024-05-22 Uwe Schulzweida
* cdiInqContents: missing lock of non thread-safe netCDF4/HDF5 calls (bug fix)
2024-05-21 Uwe Schulzweida
* Version 2.4.1 released
......
......@@ -380,6 +380,8 @@ streamFilename(int streamID)
static int
cdiInqContents(stream_t *streamptr)
{
if (streamptr->lockIO) CDI_IO_LOCK();
int status = 0;
int filetype = streamptr->filetype;
......@@ -418,6 +420,8 @@ cdiInqContents(stream_t *streamptr)
}
}
if (streamptr->lockIO) CDI_IO_UNLOCK();
if (status == 0)
{
int taxisID = vlistInqTaxis(streamptr->vlistID);
......@@ -667,7 +671,7 @@ streamOpenID(const char *filename, char filemode, int filetype, int resH)
if (CDI_Threadsafe)
{
#ifndef HAVE_LIBPTHREAD
Error("CDI threadsafe failed, pthread support not compiled!");
Error("CDI threadsafe failed, pthread support not compiled in!");
#endif
if (filetype == CDI_FILETYPE_NC4 || filetype == CDI_FILETYPE_NC4C) streamptr->lockIO = true;
}
......
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