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

fileOpen: check errno

parent c6c88649
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,6 @@ char *cdiStringError(int cdiErrno)
static char _EUNC4[] = "Unsupported netCDF4 structure";
static char _ELIMIT[] = "Internal limits exceeded";
printf("cdiErrno: %d\n", cdiErrno);
printf("errno: %d\n", errno);
switch (cdiErrno) {
case CDI_ESYSTEM:
{
......
......@@ -615,6 +615,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case FILETYPE_SRV:
{
fileID = fileOpen(filename, filemode);
if ( fileID < 0 ) fileID = CDI_ESYSTEM;
record = (Record *) malloc(sizeof(Record));
record->buffer = NULL;
record->srvp = srvNew();
......@@ -625,6 +626,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case FILETYPE_EXT:
{
fileID = fileOpen(filename, filemode);
if ( fileID < 0 ) fileID = CDI_ESYSTEM;
record = (Record *) malloc(sizeof(Record));
record->buffer = NULL;
record->extp = extNew();
......@@ -635,6 +637,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
case FILETYPE_IEG:
{
fileID = fileOpen(filename, filemode);
if ( fileID < 0 ) fileID = CDI_ESYSTEM;
record = (Record *) malloc(sizeof(Record));
record->buffer = NULL;
record->iegp = iegNew();
......
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