diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2010-09-09 18:15:36 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2010-09-09 18:15:36 (GMT) |
commit | 073eb187d6589e5741065038d3f4ca3f634381d9 (patch) | |
tree | c8907e2e4ea22075a85b8ea8d264a53d10c681c3 /src/H5F.c | |
parent | bed127641399ec6c6e1479b7c394fd3a4eb56438 (diff) | |
download | hdf5-073eb187d6589e5741065038d3f4ca3f634381d9.zip hdf5-073eb187d6589e5741065038d3f4ca3f634381d9.tar.gz hdf5-073eb187d6589e5741065038d3f4ca3f634381d9.tar.bz2 |
[svn-r19363] 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1063,7 +1063,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") @@ -1874,7 +1874,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 */ @@ -1886,7 +1886,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 */ @@ -1973,7 +1973,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: |