summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-09-30 21:51:05 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-09-30 21:51:05 (GMT)
commit8410a8536536ad6bdde5f09e643a9123df555460 (patch)
tree4684a484d6e75974dd83655f942d01524d5df719 /src/H5F.c
parenta4bb3150b8c6847891129a7c6fe1d7551dd80d27 (diff)
downloadhdf5-8410a8536536ad6bdde5f09e643a9123df555460.zip
hdf5-8410a8536536ad6bdde5f09e643a9123df555460.tar.gz
hdf5-8410a8536536ad6bdde5f09e643a9123df555460.tar.bz2
[svn-r5954]
Purpose: a bug fix Description: When a file is opened for a second time, file close degree is supposed to be either the same as the first open, or default as the first open is also default. Platforms tested: Linux 2.2(eirene), Solaris 2.7(arabica), IRIX64 6.5(modi4)
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 0a9c64d..ec0fb31 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2046,8 +2046,13 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
else
shared->fc_degree = fc_degree;
} else if(shared->nrefs > 1) {
- if(fc_degree != shared->fc_degree)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match");
+ if(fc_degree==H5F_CLOSE_DEFAULT) {
+ if(shared->fc_degree != H5F_CLOSE_DEFAULT && shared->fc_degree!=shared->lf->cls->fc_degree)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match");
+ } else {
+ if(fc_degree != shared->fc_degree)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, NULL, "file close degree doesn't match");
+ }
}
/* Success */