summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-06 19:36:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-06 19:36:07 (GMT)
commita07d6b52fb0a231c2c6e60b1ae4d7550894c4b58 (patch)
treeb3242181fab7dcbd4463252edbaea409e8796b5c /src/H5Z.c
parent0cef4c9151010e0e2498e81aa7a9186d3280c399 (diff)
downloadhdf5-a07d6b52fb0a231c2c6e60b1ae4d7550894c4b58.zip
hdf5-a07d6b52fb0a231c2c6e60b1ae4d7550894c4b58.tar.gz
hdf5-a07d6b52fb0a231c2c6e60b1ae4d7550894c4b58.tar.bz2
HDFFV-10297 - fix repack individual objects
includes H5Zfilter_avail() fix
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 1dc93d8..8dbbdb0 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -609,12 +609,6 @@ H5Zfilter_avail(H5Z_filter_t id)
if((ret_value = H5Z_filter_avail(id)) < 0)
HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter")
- else if(ret_value == FALSE) {
- const H5Z_class2_t *filter_info;
-
- if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id)))
- ret_value = TRUE;
- } /* end if */
done:
FUNC_LEAVE_API(ret_value)
@@ -633,6 +627,7 @@ htri_t
H5Z_filter_avail(H5Z_filter_t id)
{
size_t i; /* Local index variable */
+ const H5Z_class2_t *filter_info;
htri_t ret_value = FALSE; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -640,8 +635,12 @@ H5Z_filter_avail(H5Z_filter_t id)
/* Is the filter already registered? */
for(i = 0; i < H5Z_table_used_g; i++)
if(H5Z_table_g[i].id == id)
- HGOTO_DONE(TRUE)
+ HGOTO_DONE(TRUE)
+ if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)id)))
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register loaded filter")
+ HGOTO_DONE(TRUE)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_filter_avail() */
@@ -1136,7 +1135,7 @@ H5Z_find(H5Z_filter_t id)
/* Get the index in the global table */
if((idx=H5Z_find_idx(id))<0)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter is not registered")
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter %d is not registered", id)
/* Set return value */
ret_value=H5Z_table_g+idx;