summaryrefslogtreecommitdiffstats
path: root/src/H5I.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-06 15:06:05 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-06 15:06:05 (GMT)
commit509b8f645deadb880ea09ca5d89f9a28526d78ec (patch)
tree6dccced9fa3cb2ab60bb5cdb019fd6faceb831f1 /src/H5I.c
parenta8251f3467bf00e5f1dbe086c96e404ad029a677 (diff)
downloadhdf5-509b8f645deadb880ea09ca5d89f9a28526d78ec.zip
hdf5-509b8f645deadb880ea09ca5d89f9a28526d78ec.tar.gz
hdf5-509b8f645deadb880ea09ca5d89f9a28526d78ec.tar.bz2
[svn-r13465] Description:
Fix bug in external links when "strong" file close degree is used. Make external link callbacks use standard error reporting mechanisms. Other minor code cleanups... Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5I.c')
-rw-r--r--src/H5I.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/H5I.c b/src/H5I.c
index 771e45d..195bb38 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -2077,15 +2077,11 @@ H5I_get_file_id(hid_t obj_id)
if(H5I_inc_ref(ret_value) < 0)
HGOTO_ERROR(H5E_ATOM, H5E_CANTSET, FAIL, "incrementing file ID failed")
}
- else if(type == H5I_DATATYPE) {
+ else if(type == H5I_DATATYPE || type == H5I_GROUP || type == H5I_DATASET || type == H5I_ATTR) {
if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "not a named datatype")
- ret_value = H5F_get_id(loc.oloc->file);
- }
- else if(type == H5I_GROUP || type == H5I_DATASET || type == H5I_ATTR) {
- if(H5G_loc(obj_id, &loc) < 0)
- HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get symbol table info")
- ret_value = H5F_get_id(loc.oloc->file);
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get object location")
+ if((ret_value = H5F_get_id(loc.oloc->file)) < 0)
+ HGOTO_ERROR(H5E_ATOM, H5E_CANTGET, FAIL, "can't get file ID")
}
else
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "invalid object ID")