summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-12 16:27:42 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-07-12 16:27:42 (GMT)
commite3f35800977504c45ec2847f1f23b7f5ba48ad76 (patch)
tree5dffaf97d6109a20a0d3a5ad35ea1b785056aa87 /src/H5A.c
parentbef08a7c0ec8f1bdc6a2637401b99d3c2bbb0617 (diff)
downloadhdf5-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/H5A.c')
-rw-r--r--src/H5A.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5A.c b/src/H5A.c
index a4558fe..7ba7a6e 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1508,6 +1508,19 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
if((obj_loc_id = H5O_open_by_loc(&obj_loc, lapl_id, H5AC_ind_dxpl_id, TRUE)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ /* get the native object from the ID created by the object header and create
+ a "VOL object" ID */
+ {
+ void *temp_obj = NULL;
+ H5I_type_t obj_type;
+ obj_type = H5I_get_type(obj_loc_id);
+ if(NULL == (temp_obj = H5I_remove(obj_loc_id)))
+ HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "unable to open object")
+ /* Get an atom for the datatype */
+ if((obj_loc_id = H5VL_native_register(obj_type, temp_obj, TRUE)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register datatype")
+ }
+
/* Build attribute operator info */
attr_op.op_type = H5A_ATTR_OP_APP2;
attr_op.u.app_op2 = op;