diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-17 21:54:02 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-17 21:54:02 (GMT) |
commit | 33f70a817aba7a4dd020fb29a187c53ba05e157c (patch) | |
tree | 4ff9ee2addb8a67212bc01170a102a2399d4c005 /src/H5VLnative.c | |
parent | 2afee27ba9b7f22aef111b282106e5deafb61e7b (diff) | |
download | hdf5-33f70a817aba7a4dd020fb29a187c53ba05e157c.zip hdf5-33f70a817aba7a4dd020fb29a187c53ba05e157c.tar.gz hdf5-33f70a817aba7a4dd020fb29a187c53ba05e157c.tar.bz2 |
[svn-r22292] remove unnecessary lookup for object locations into VOL
add a public API routine to set a user defined VOL driver
some fixes to allow vol plugins to be created and used outside the library
Diffstat (limited to 'src/H5VLnative.c')
-rw-r--r-- | src/H5VLnative.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/H5VLnative.c b/src/H5VLnative.c index 69cf274..d752762 100644 --- a/src/H5VLnative.c +++ b/src/H5VLnative.c @@ -1929,15 +1929,19 @@ H5VL_native_group_get(hid_t obj_id, H5VL_group_get_t get_type, va_list arguments if(H5G_loc(obj_id, &loc) < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a location") - if(!H5F_addr_defined(obj_loc->oloc->addr)) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no address supplied") - - /* Retrieve the group's information */ - if(H5G__obj_info(obj_loc->oloc, grp_info, H5AC_ind_dxpl_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + if (NULL == obj_loc) { + /* Retrieve the group's information */ + if(H5G__obj_info(loc.oloc, grp_info, H5AC_ind_dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + } + else { + /* Retrieve the group's information */ + if(H5G__obj_info(obj_loc->oloc, grp_info, H5AC_ind_dxpl_id) < 0) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") - if(H5G_loc_free(obj_loc) < 0) - HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") + if(H5G_loc_free(obj_loc) < 0) + HDONE_ERROR(H5E_SYM, H5E_CANTRELEASE, FAIL, "can't free location") + } break; } default: |