diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-12 16:27:42 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-07-12 16:27:42 (GMT) |
commit | e3f35800977504c45ec2847f1f23b7f5ba48ad76 (patch) | |
tree | 5dffaf97d6109a20a0d3a5ad35ea1b785056aa87 /src/H5Aint.c | |
parent | bef08a7c0ec8f1bdc6a2637401b99d3c2bbb0617 (diff) | |
download | hdf5-e3f35800977504c45ec2847f1f23b7f5ba48ad76.zip hdf5-e3f35800977504c45ec2847f1f23b7f5ba48ad76.tar.gz hdf5-e3f35800977504c45ec2847f1f23b7f5ba48ad76.tar.bz2 |
[svn-r22565] change OH id registration to original way, and re-register the ID with the VOL info on the upper level (API and iteration/visit routines)
- this fixes the bug exposed in H5Oopen with external log plugin
update the private VL registration routine to take an app_ref
update the datatype ID creation for the VOL to take an app_ref
Diffstat (limited to 'src/H5Aint.c')
-rw-r--r-- | src/H5Aint.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index 8d86931..431ea17 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -282,7 +282,7 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type, ret_value = attr; done: if(NULL == ret_value && attr && H5A_close(attr)) - HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, FAIL, "can't close attribute") + HDONE_ERROR(H5E_ATTR, H5E_CANTFREE, NULL, "can't close attribute") FUNC_LEAVE_NOAPI_TAG(ret_value, NULL) } /* H5A_create() */ @@ -748,7 +748,6 @@ hid_t H5A_get_type(H5A_t *attr) { H5T_t *dt = NULL; - H5T_t *type = NULL; hid_t ret_value = FAIL; FUNC_ENTER_NOAPI_NOINIT @@ -778,14 +777,7 @@ H5A_get_type(H5A_t *attr) /* If this is a committed datatype, we need to recreate the two level IDs, where the VOL object is a copy of the returned datatype */ - /* Copy the dataset's datatype */ - if(NULL == (type = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to copy datatype") - - H5T_set_vol_object(type, (void *)dt); - - /* get an ID for the object */ - if((ret_value = H5VL_native_register(H5I_DATATYPE, type, TRUE)) < 0) + if((ret_value = H5VL_native_register(H5I_DATATYPE, dt, TRUE)) < 0) HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize file handle") } else { @@ -797,8 +789,6 @@ done: if(ret_value < 0) { if(dt && H5T_close(dt) < 0) HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") - if(type && H5T_close(type) < 0) - HDONE_ERROR(H5E_DATASET, H5E_CLOSEERROR, FAIL, "unable to release datatype") } /* end if */ FUNC_LEAVE_NOAPI(ret_value) |