summaryrefslogtreecommitdiffstats
path: root/src/H5VLint.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/H5VLint.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/H5VLint.c')
-rw-r--r--src/H5VLint.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/H5VLint.c b/src/H5VLint.c
index 08c539a..25b6fd2 100644
--- a/src/H5VLint.c
+++ b/src/H5VLint.c
@@ -368,7 +368,7 @@ done:
*-------------------------------------------------------------------------
*/
hid_t
-H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin)
+H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin, hbool_t app_ref)
{
hid_t ret_value = FAIL;
@@ -377,21 +377,17 @@ H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin)
/* Get an atom for the object and attach VOL information and free function to the ID */
switch(obj_type) {
case H5I_GROUP:
- if((ret_value = H5I_register(obj_type, obj, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object")
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5G_close_group) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
+ if((ret_value = H5I_register2(obj_type, obj, vol_plugin, app_ref)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
break;
case H5I_DATASET:
- if((ret_value = H5I_register(obj_type, obj, TRUE)) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize object")
- if (H5I_register_aux(ret_value, vol_plugin, (H5I_free2_t)H5D_close_dataset) < 0)
- HGOTO_ERROR(H5E_VOL, H5E_CANTINIT, FAIL, "can't attach vol info to ID")
+ if((ret_value = H5I_register2(obj_type, obj, vol_plugin, app_ref)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize dataset handle")
break;
case H5I_DATATYPE:
- if ((ret_value = H5VL_create_datatype(obj, vol_plugin, H5_REQUEST_NULL)) < 0)
+ if ((ret_value = H5VL_create_datatype(obj, vol_plugin, app_ref, H5_REQUEST_NULL)) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to atomize datatype handle")
break;
@@ -413,7 +409,6 @@ H5VL_object_register(void *obj, H5I_type_t obj_type, H5VL_t *vol_plugin)
HGOTO_ERROR(H5E_OHDR, H5E_BADTYPE, FAIL, "invalid object type")
} /* end switch */
- vol_plugin->nrefs ++;
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5VL_object_register() */