Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
e5f8153c
Commit
e5f8153c
authored
Jul 25, 2012
by
Thomas Jahns
🤸
Browse files
Correctly conditionalize stream access functions.
* These would have been called incorrectly previously.
parent
3b1deec7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream.c
View file @
e5f8153c
...
...
@@ -1393,11 +1393,12 @@ int streamDefTimestep(int streamID, int tsID)
streamptr
->
ntsteps
=
tsID
+
1
;
if
(
(
streamptr
->
filetype
==
FILETYPE_NC
||
streamptr
->
filetype
==
FILETYPE_NC2
||
streamptr
->
filetype
==
FILETYPE_NC4
||
streamptr
->
filetype
==
FILETYPE_NC4C
)
&&
vlistHasTime
(
vlistID
)
)
if
(
namespaceHasLocalFile
(
namespaceGetActive
())
&&
(
streamptr
->
filetype
==
FILETYPE_NC
||
streamptr
->
filetype
==
FILETYPE_NC2
||
streamptr
->
filetype
==
FILETYPE_NC4
||
streamptr
->
filetype
==
FILETYPE_NC4C
)
&&
vlistHasTime
(
vlistID
))
cdfDefTimestep
(
streamID
,
tsID
);
cdiCreateRecords
(
streamID
,
tsID
);
...
...
@@ -2076,6 +2077,7 @@ void streamDefVlist(int streamID, int vlistID)
stream_check_ptr
(
__func__
,
streamptr
);
#ifdef USE_MPI
if
(
!
namespaceHasLocalFile
(
namespaceGetActive
()))
{
statusCode
nspStatus
=
namespaceInqResStatus
();
switch
(
nspStatus
)
...
...
@@ -2092,6 +2094,7 @@ void streamDefVlist(int streamID, int vlistID)
xabort
(
"INTERNAL ERROR"
);
}
}
#endif
if
(
streamptr
->
vlistID
==
CDI_UNDEFID
)
...
...
@@ -2110,7 +2113,8 @@ void streamDefVlist(int streamID, int vlistID)
vlistInqVarMissval
(
vlistID
,
varID
));
}
if
(
streamptr
->
filemode
==
'w'
)
if
(
namespaceHasLocalFile
(
namespaceGetActive
())
&&
streamptr
->
filemode
==
'w'
)
{
if
(
streamptr
->
filetype
==
FILETYPE_NC
||
streamptr
->
filetype
==
FILETYPE_NC2
||
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment