summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-07-24 23:13:29 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-07-24 23:13:29 (GMT)
commit9a520f67b2e8379e28c22f0c3578a9ce43b4907a (patch)
tree86cc109ff485f024ec0f34afad9350fe9def2573 /src/H5Z.c
parente143242ce101661a29c5a65f0dd9a4aa37a1af64 (diff)
downloadhdf5-9a520f67b2e8379e28c22f0c3578a9ce43b4907a.zip
hdf5-9a520f67b2e8379e28c22f0c3578a9ce43b4907a.tar.gz
hdf5-9a520f67b2e8379e28c22f0c3578a9ce43b4907a.tar.bz2
[svn-r14012] Description:
Fix problem with I/O pipeline messages where the version of the format for a I/O pipeline message could depend on the "use the latest format" flag from the file after it was initially created. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Mac OS X/32 10.4.10 (amazon) Solaris/32 2.10 (linew)
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 573ec6b..c1f9bf6 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -785,6 +785,10 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
if(pline->nused >= H5Z_MAX_NFILTERS)
HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline")
+ /* Check for freshly allocated filter pipeline */
+ if(pline->version == 0)
+ pline->version = H5O_PLINE_VERSION_1;
+
/* Allocate additional space in the pipeline if it's full */
if(pline->nused >= pline->nalloc) {
H5O_pline_t x;
@@ -1236,6 +1240,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_delete() */
+
/*-------------------------------------------------------------------------
* Function: H5Zget_filter_info
*
@@ -1284,3 +1289,33 @@ done:
FUNC_LEAVE_API(ret_value)
}
+
+/*-------------------------------------------------------------------------
+ * Function: H5Z_set_latest_version
+ *
+ * Purpose: Set the encoding for a I/O filter pipeline to the latest version.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, July 24, 2007
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Z_set_latest_version(H5O_pline_t *pline)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5Z_set_latest_version, FAIL)
+
+ /* Sanity check */
+ HDassert(pline);
+
+ /* Set encoding of I/O pipeline to latest version */
+ pline->version = H5O_PLINE_VERSION_LATEST;
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5Z_set_latest_version() */
+