diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-04-10 17:47:16 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-04-10 17:47:16 (GMT) |
commit | 3b72762036c65978ef96bb1422a671dce20ba46e (patch) | |
tree | 7da68b47d261a1ea03e1536de72aeac6f7c6392b /src/H5Ocopy.c | |
parent | b452fc97e6bc7c0a4b3d143cfef7ef10bb53b88d (diff) | |
download | hdf5-3b72762036c65978ef96bb1422a671dce20ba46e.zip hdf5-3b72762036c65978ef96bb1422a671dce20ba46e.tar.gz hdf5-3b72762036c65978ef96bb1422a671dce20ba46e.tar.bz2 |
[svn-r26777] - Fix usage of the internal AC global dxpls
- allocate sieve buffer with calloc instead of malloc
tested with h5committest
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r-- | src/H5Ocopy.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c index fc82407..1471ae5 100644 --- a/src/H5Ocopy.c +++ b/src/H5Ocopy.c @@ -86,7 +86,7 @@ static herr_t H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_ds static herr_t H5O_copy_header(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, hid_t dxpl_id, hid_t ocpypl_id); static herr_t H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, - const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); + const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id); static herr_t H5O_copy_obj_by_ref(H5O_loc_t *src_oloc, hid_t dxpl_id, H5O_loc_t *dst_oloc, H5G_loc_t *dst_root_loc, H5O_copy_t *cpy_info); static herr_t H5O_copy_free_comm_dt_cb(void *item, void *key, void *op_data); @@ -243,7 +243,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, H5G_loc_reset(&tmp_loc); /* Check if object already exists in destination */ - if(H5G_loc_find(&dst_loc, dst_name, &tmp_loc, H5P_DEFAULT, H5AC_dxpl_id) >= 0) { + if(H5G_loc_find(&dst_loc, dst_name, &tmp_loc, H5P_DEFAULT, H5AC_ind_dxpl_id) >= 0) { H5G_name_free(&tmp_path); HGOTO_ERROR(H5E_SYM, H5E_EXISTS, FAIL, "destination object already exists") } /* end if */ @@ -255,7 +255,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, H5G_loc_reset(&src_loc); /* Find the source object to copy */ - if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_dxpl_id) < 0) + if(H5G_loc_find(&loc, src_name, &src_loc/*out*/, H5P_DEFAULT, H5AC_ind_dxpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "source object not found") loc_found = TRUE; @@ -281,7 +281,7 @@ H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not object copy property list") /* Do the actual copying of the object */ - if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id) < 0) + if(H5O_copy_obj(&src_loc, &dst_loc, dst_name, ocpypl_id, lcpl_id, H5AC_dxpl_id) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTCOPY, FAIL, "unable to copy object") done: @@ -1151,14 +1151,13 @@ done: */ static herr_t H5O_copy_obj(H5G_loc_t *src_loc, H5G_loc_t *dst_loc, const char *dst_name, - hid_t ocpypl_id, hid_t lcpl_id) + hid_t ocpypl_id, hid_t lcpl_id, hid_t dxpl_id) { H5G_name_t new_path; /* Copied object group hier. path */ H5O_loc_t new_oloc; /* Copied object object location */ H5G_loc_t new_loc; /* Group location of object copied */ H5F_t *cached_dst_file; /* Cached destination file */ hbool_t entry_inserted = FALSE; /* Flag to indicate that the new entry was inserted into a group */ - hid_t dxpl_id = H5AC_dxpl_id; /* DXPL for operation */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1656,7 +1655,8 @@ H5O_copy_search_comm_dt_check(H5O_loc_t *obj_oloc, attr_op.u.lib_op = H5O_copy_search_comm_dt_attr_cb; udata->obj_oloc.file = obj_oloc->file; udata->obj_oloc.addr = obj_oloc->addr; - if(H5O_attr_iterate_real((hid_t)-1, obj_oloc, udata->dxpl_id, H5_INDEX_NAME, H5_ITER_NATIVE, 0, NULL, &attr_op, udata) < 0) + if(H5O_attr_iterate_real((hid_t)-1, obj_oloc, udata->dxpl_id, H5_INDEX_NAME, + H5_ITER_NATIVE, (hsize_t)0, NULL, &attr_op, udata) < 0) HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "error iterating over attributes"); done: |