diff options
author | Giuseppe CONDORELLI <giuseppe.condorelli@st.com> | 2009-07-29 06:05:20 -0400 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-08-11 22:15:18 +0200 |
commit | 253cb831f5861358a7fa673305cdf7ded1096f44 (patch) | |
tree | 855d1d4fe7a03c74256439f746de61f6dfe5837a /lib_generic/zlib.c | |
parent | dce3d797102b6618e8bdd4a09cfd35969f165d86 (diff) | |
download | u-boot-imx-253cb831f5861358a7fa673305cdf7ded1096f44.zip u-boot-imx-253cb831f5861358a7fa673305cdf7ded1096f44.tar.gz u-boot-imx-253cb831f5861358a7fa673305cdf7ded1096f44.tar.bz2 |
zlib: add watchdog reset call
This patch adds watchdog reset call to allow its invokation during decompression
phase. This control was present on old zlib version and here it is
backported for those relevant routines. This patch is sent as a zlib separate
one beacuse it was not tested due to specific board lack.
zlib patches will be unified just in one when this will be validated through
tests.
Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
Diffstat (limited to 'lib_generic/zlib.c')
-rw-r--r-- | lib_generic/zlib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c index 3d5b5c0..1b6db32 100644 --- a/lib_generic/zlib.c +++ b/lib_generic/zlib.c @@ -1040,6 +1040,8 @@ z_streamp strm; state->hold = 0; state->bits = 0; state->lencode = state->distcode = state->next = state->codes; + if (strm->outcb != Z_NULL) + (*strm->outcb)(Z_NULL, 0); Tracev((stderr, "inflate: reset\n")); return Z_OK; } @@ -1952,7 +1954,11 @@ z_streamp strm; if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - if (state->window != Z_NULL) ZFREE(strm, state->window); + if (state->window != Z_NULL) { + if (strm->outcb != Z_NULL) + (*strm->outcb)(Z_NULL, 0); + ZFREE(strm, state->window); + } ZFREE(strm, strm->state); strm->state = Z_NULL; Tracev((stderr, "inflate: end\n")); |