diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2013-03-22 21:39:53 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2013-03-22 21:39:53 (GMT) |
commit | 8ffd55478e11904f193b4a98477b3bcb452b93ac (patch) | |
tree | 5843b13e826ae4c9b3f471dfa4536d7882b4d8ba /src/H5Z.c | |
parent | f0e328cc04ae9cf6032e740cf223fcfdd83a5f6d (diff) | |
download | hdf5-8ffd55478e11904f193b4a98477b3bcb452b93ac.zip hdf5-8ffd55478e11904f193b4a98477b3bcb452b93ac.tar.gz hdf5-8ffd55478e11904f193b4a98477b3bcb452b93ac.tar.bz2 |
[svn-r23432] I added a new macro HDF5_PLUGIN_PRELOAD to skip plugin loading during data reading.
Tested on koala and jam.
Diffstat (limited to 'src/H5Z.c')
-rw-r--r-- | src/H5Z.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -1115,8 +1115,9 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, continue;/*filter excluded*/ } - /* If the filter isn't registered, try to load it dynamically and register it. Otherwise, return failure */ - if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0) { + /* If the filter isn't registered and the application doesn't indicate no plugin through HDF5_PRELOAD_PLUG (using the symbol "::"), + * try to load it dynamically and register it. Otherwise, return failure */ + if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0 && !H5PL_no_plugin()) { H5Z_class2_t *filter_info; if(NULL != (filter_info = (H5Z_class2_t *)H5PL_load(H5PL_TYPE_FILTER, (int)(pline->filter[idx].id)))) { @@ -1141,7 +1142,14 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags, else HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered") } /* end if */ - } /* end if */ + } else if((fclass_idx = H5Z_find_idx(pline->filter[idx].id)) < 0 && H5PL_no_plugin()) { + /* Print out the filter name to give more info. But the name is optional for + * the filter */ + if(pline->filter[idx].name) + HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter '%s' is not registered", pline->filter[idx].name) + else + HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter (name unavailable) is not registered") + } fclass=&H5Z_table_g[fclass_idx]; #ifdef H5Z_DEBUG |