summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-19 18:33:44 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2014-06-19 18:33:44 (GMT)
commit36d512a1abb18196c655c627801d1e7a06a7eef7 (patch)
tree037d49be559001488b006dd3295b62ded9237f02
parent319151d9d03e152f81c9be4bd727b2af210e79e4 (diff)
downloadhdf5-36d512a1abb18196c655c627801d1e7a06a7eef7.zip
hdf5-36d512a1abb18196c655c627801d1e7a06a7eef7.tar.gz
hdf5-36d512a1abb18196c655c627801d1e7a06a7eef7.tar.bz2
[svn-r25331] fixed bug in attr get callbacks.
-rw-r--r--examples/h5ff_client_attr.c8
-rw-r--r--src/H5VLiod.c20
2 files changed, 18 insertions, 10 deletions
diff --git a/examples/h5ff_client_attr.c b/examples/h5ff_client_attr.c
index 46fff84..200b7c0 100644
--- a/examples/h5ff_client_attr.c
+++ b/examples/h5ff_client_attr.c
@@ -171,6 +171,14 @@ int main(int argc, char **argv) {
H5Sclose(sid2);
+ {
+ hid_t temp_sid;
+
+ temp_sid = H5Aget_space(aid5);
+ assert(temp_sid > 0);
+ H5Sclose(temp_sid);
+ }
+
ret = H5Aclose_ff(aid1, e_stack);
assert(ret == 0);
diff --git a/src/H5VLiod.c b/src/H5VLiod.c
index 649c444..4c85ba6 100644
--- a/src/H5VLiod.c
+++ b/src/H5VLiod.c
@@ -5197,16 +5197,6 @@ H5VL_iod_attribute_get(void *_obj, H5VL_attr_get_t get_type, hid_t dxpl_id,
FUNC_ENTER_NOAPI_NOINIT
- /* get the context ID */
- if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
- if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id");
-
- /* get the RC object */
- if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID")
-
switch (get_type) {
/* H5Aget_space */
case H5VL_ATTR_GET_SPACE:
@@ -5293,6 +5283,16 @@ H5VL_iod_attribute_get(void *_obj, H5VL_attr_get_t get_type, hid_t dxpl_id,
htri_t *ret = va_arg (arguments, htri_t *);
attr_op_in_t input;
+ /* get the context ID */
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(dxpl_id)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID");
+ if(H5P_get(plist, H5VL_CONTEXT_ID, &rcxt_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for trans_id");
+
+ /* get the RC object */
+ if(NULL == (rc = (H5RC_t *)H5I_object_verify(rcxt_id, H5I_RC)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a READ CONTEXT ID")
+
/* allocate parent request array */
if(NULL == (parent_reqs = (H5VL_iod_request_t **)
H5MM_malloc(sizeof(H5VL_iod_request_t *))))