summaryrefslogtreecommitdiffstats
path: root/src/H5Dscatgath.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-04-20 16:54:52 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-04-20 16:54:52 (GMT)
commitc7aa94f4ec728ebaae0502ece4e518224a73da7c (patch)
tree9229c523148bb5785fd70d93479e332394980cf1 /src/H5Dscatgath.c
parent6d13b7a243e968b4ee365a8ea2b54c5f7640e8f6 (diff)
downloadhdf5-c7aa94f4ec728ebaae0502ece4e518224a73da7c.zip
hdf5-c7aa94f4ec728ebaae0502ece4e518224a73da7c.tar.gz
hdf5-c7aa94f4ec728ebaae0502ece4e518224a73da7c.tar.bz2
[svn-r16803] 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 */
/*