diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2006-10-25 00:03:34 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2006-10-25 00:03:34 (GMT) |
commit | 8822882ec418af04afd9f671afe2fe0aa1b7c0d9 (patch) | |
tree | 4f85e5df7ef1bbbb99a2a75ffb546fe971bd9324 | |
parent | b3b05571db49075e8552c58c667392c8e283c345 (diff) | |
download | hdf5-8822882ec418af04afd9f671afe2fe0aa1b7c0d9.zip hdf5-8822882ec418af04afd9f671afe2fe0aa1b7c0d9.tar.gz hdf5-8822882ec418af04afd9f671afe2fe0aa1b7c0d9.tar.bz2 |
[svn-r12810] Purpose:
Bug fix.
Description:
H5FD_get_vfd_handle() would return okay even if an VFD did not have the
get_vfd_handle callback function defined.
Solution:
Return failure if get_vfd_handle function is not defined.
Tested:
in heping and copper.
-rw-r--r-- | src/H5FD.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3668,7 +3668,9 @@ herr_t H5FD_get_vfd_handle(H5FD_t *file, hid_t fapl, void** file_handle) FUNC_ENTER_NOAPI(H5FD_get_vfd_handle, FAIL) assert(file_handle); - if(file->cls->get_handle && ((ret_value=file->cls->get_handle(file, fapl, file_handle)) < 0)) + if(NULL==file->cls->get_handle) + HGOTO_ERROR(H5E_VFL, H5E_UNSUPPORTED, NULL, "file driver has no `get_vfd_handle' method"); + if((ret_value=file->cls->get_handle(file, fapl, file_handle)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver") done: |