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/H5Toh.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/H5Toh.c')
-rw-r--r-- | src/H5Toh.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/H5Toh.c b/src/H5Toh.c index 9c9313a..99cb396 100644 --- a/src/H5Toh.c +++ b/src/H5Toh.c @@ -133,7 +133,7 @@ done: static hid_t H5O_dtype_open(const H5G_loc_t *obj_loc, hid_t UNUSED lapl_id, hid_t dxpl_id, hbool_t app_ref) { - H5T_t *type = NULL, *dt = NULL; /* Datatype opened */ + H5T_t *dt = NULL; /* Datatype opened */ hid_t ret_value; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -144,22 +144,14 @@ H5O_dtype_open(const H5G_loc_t *obj_loc, hid_t UNUSED lapl_id, hid_t dxpl_id, hb if(NULL == (dt = H5T_open(obj_loc, dxpl_id))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, FAIL, "unable to open 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 atom for the datatype */ - if((ret_value = H5VL_native_register(H5I_DATATYPE, type, app_ref)) < 0) - HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataset") + /* Register an ID for the datatype */ + if((ret_value = H5I_register(H5I_DATATYPE, dt, app_ref)) < 0) + HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype") 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_DATATYPE, H5E_CLOSEERROR, FAIL, "unable to release datatype") } FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_dtype_open() */ |