summaryrefslogtreecommitdiffstats
path: root/src/H5Dscatgath.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-04-20 16:59:01 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-04-20 16:59:01 (GMT)
commit90aea941c557b4db38abe02ff63c426fc298c421 (patch)
tree5c113a73c44111d34ed9c2ef2e92b7ece5a79148 /src/H5Dscatgath.c
parent4446e5da7186aad436db16600bf3aca6cadc7635 (diff)
downloadhdf5-90aea941c557b4db38abe02ff63c426fc298c421.zip
hdf5-90aea941c557b4db38abe02ff63c426fc298c421.tar.gz
hdf5-90aea941c557b4db38abe02ff63c426fc298c421.tar.bz2
[svn-r16804] Purpose: Fix bug 1548
Description: When writing data to a dataset, the data transform was performed after type conversion. This caused an error if the file type was non-native. This has been changed so data transforms are always performed on the memory type. Tested: jam, linew. smirom (h5committest)
Diffstat (limited to 'src/H5Dscatgath.c')
-rw-r--r--src/H5Dscatgath.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Dscatgath.c b/src/H5Dscatgath.c
index bb9f46b..ed73f3c 100644
--- a/src/H5Dscatgath.c
+++ b/src/H5Dscatgath.c
@@ -662,6 +662,12 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
HGOTO_ERROR(H5E_IO, H5E_READERROR, FAIL, "file gather failed")
} /* end if */
+ /* Do the data transform before the type conversion (since
+ * transforms must be done in the memory type). */
+ if(!type_info->is_xform_noop)
+ if(H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts, type_info->mem_type) < 0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
+
/*
* Perform datatype conversion.
*/
@@ -669,11 +675,6 @@ H5D_scatgath_write(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf
smine_nelmts, (size_t)0, (size_t)0, type_info->tconv_buf,
type_info->bkg_buf, io_info->dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTCONVERT, FAIL, "datatype conversion failed")
-
- /* Do the data transform after the type conversion (since we're using dataset->shared->type). */
- if(!type_info->is_xform_noop)
- if(H5Z_xform_eval(dxpl_cache->data_xform_prop, type_info->tconv_buf, smine_nelmts, type_info->dset_type) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Error performing data transform")
} /* end else */
/*