summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-02-20 20:21:08 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-02-20 20:21:08 (GMT)
commitb30e37ea78a85c9a2e3abda7fddaabb636935b1c (patch)
treeae7e602f229221e664baf6c90eb4ee99edbd9fe1 /src
parentd0ae86bc64d2bfedeeb605951eb2ca73a4d6b0b9 (diff)
downloadhdf5-b30e37ea78a85c9a2e3abda7fddaabb636935b1c.zip
hdf5-b30e37ea78a85c9a2e3abda7fddaabb636935b1c.tar.gz
hdf5-b30e37ea78a85c9a2e3abda7fddaabb636935b1c.tar.bz2
[svn-r24725] HDFFV-8629: h5repack will not attempt to remove UD filters. h5repack requires a check for UD filters that also must check if the filter can be dynamically loaded. This require a change in the library that checks for this.
Tested: locally and reviewed
Diffstat (limited to 'src')
-rw-r--r--src/H5Z.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 901b506..c55a5e3 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -664,7 +664,13 @@ H5Zfilter_avail(H5Z_filter_t id)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
if((ret_value = H5Z_filter_avail(id)) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "unable to check the availability of the filter")
+ 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)
@@ -1324,22 +1330,20 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
*/
if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) {
hbool_t issue_error = FALSE;
-
- /* Check for "no plugins" indicated" */
- const H5Z_class2_t *filter_info;
-
- /* Try loading the filter */
- if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) {
- /* Register the filter we loaded */
- if(H5Z_register(filter_info) < 0)
- HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
-
- /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
- if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
- issue_error = TRUE;
- } /* end if */
- else
- issue_error = TRUE;
+ const H5Z_class2_t *filter_info;
+
+ /* Try loading the filter */
+ if(NULL != (filter_info = (const H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) {
+ /* Register the filter we loaded */
+ if(H5Z_register(filter_info) < 0)
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
+
+ /* Search in the table of registered filters again to find the dynamic filter just loaded and registered */
+ if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0)
+ issue_error = TRUE;
+ } /* end if */
+ else
+ issue_error = TRUE;
/* Check for error */
if(issue_error) {