summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2010-09-08 17:12:18 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2010-09-08 17:12:18 (GMT)
commitec5f5c868fb4dad3452db045c627fe258b152cd2 (patch)
tree2d70e1cceb03c1d708eee738000681d7391cc8ae /src/H5F.c
parent4d88ec662b733cb6ec119e126dc96aa74ba4632b (diff)
downloadhdf5-ec5f5c868fb4dad3452db045c627fe258b152cd2.zip
hdf5-ec5f5c868fb4dad3452db045c627fe258b152cd2.tar.gz
hdf5-ec5f5c868fb4dad3452db045c627fe258b152cd2.tar.bz2
[svn-r19359] When mandatory filter failed to write data chunks, the dataset
couldn't close (bug 1260). The fix releases all resources and closes the dataset but returns a failure. Tested with h5committest - jam, heiwa, amani.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 1b97b2e..2568a9b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1057,7 +1057,7 @@ H5F_dest(H5F_t *f, hid_t dxpl_id, hbool_t flush)
if(H5I_GENPROP_LST != H5I_get_type(f->shared->fcpl_id))
/* Push error, but keep going*/
HDONE_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property list")
- if(H5I_dec_ref(f->shared->fcpl_id, FALSE) < 0)
+ if(H5I_dec_ref(f->shared->fcpl_id, FALSE, FALSE) < 0)
/* Push error, but keep going*/
HDONE_ERROR(H5E_PLIST, H5E_CANTFREE, FAIL, "can't close property list")
@@ -1868,7 +1868,7 @@ H5F_try_close(H5F_t *f)
while((obj_count = H5F_get_obj_ids(f, H5F_OBJ_LOCAL|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_ATTR, (int)(sizeof(objs)/sizeof(objs[0])), objs, FALSE)) != 0) {
/* Try to close all the open objects in this file */
for(u = 0; u < obj_count; u++)
- if(H5I_dec_ref(objs[u], FALSE) < 0)
+ if(H5I_dec_ref(objs[u], FALSE, FALSE) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't close object")
} /* end while */
@@ -1880,7 +1880,7 @@ H5F_try_close(H5F_t *f)
while((obj_count = H5F_get_obj_ids(f, H5F_OBJ_LOCAL|H5F_OBJ_DATATYPE, (int)(sizeof(objs)/sizeof(objs[0])), objs, FALSE)) != 0) {
/* Try to close all the open objects in this file */
for(u = 0; u < obj_count; u++)
- if(H5I_dec_ref(objs[u], FALSE) < 0)
+ if(H5I_dec_ref(objs[u], FALSE, FALSE) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CLOSEERROR, FAIL, "can't close object")
} /* end while */
} /* end if */
@@ -1967,7 +1967,7 @@ H5Fclose(hid_t file_id)
* Decrement reference count on atom. When it reaches zero the file will
* be closed.
*/
- if(H5I_dec_ref(file_id, TRUE) < 0)
+ if(H5I_dec_ref(file_id, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTCLOSEFILE, FAIL, "decrementing file ID failed")
done: