diff options
author | Ingela Anderton Andin <[email protected]> | 2017-11-10 15:38:03 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2017-11-10 15:38:03 +0100 |
commit | 3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f (patch) | |
tree | 33825e3233f32dc1916aaf1504b6cdcca0cf33ca /erts/preloaded/src/zlib.erl | |
parent | cca58959662d473bb329e41a84b5b260bf96a26b (diff) | |
parent | 84f29ab803e8f36ef058a47f4c2b224f4dd58220 (diff) | |
download | otp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.tar.gz otp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.tar.bz2 otp-3fb3067d953f8be9fe66d3a6687a86be2e8d2f3f.zip |
Merge branch 'maint-20' into maint
* maint-20:
Updated OTP version
Update release notes
Update version numbers
inets: Prepare for release
inets: Add missing guard
Avoid WindowBits=8 as per the manual
Fix deflateParams on zlib 1.2.11
Ignore empty binaries in enif_inspect_iovec
Emasculate writable binaries on entering an iovec
Only apply EOS behaviors if there's pending data
Stop assuming that all schedulers are managed when updating msacc
Diffstat (limited to 'erts/preloaded/src/zlib.erl')
-rw-r--r-- | erts/preloaded/src/zlib.erl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/erts/preloaded/src/zlib.erl b/erts/preloaded/src/zlib.erl index 03c9ae38a1..a4ef42204d 100644 --- a/erts/preloaded/src/zlib.erl +++ b/erts/preloaded/src/zlib.erl @@ -188,14 +188,13 @@ deflateReset_nif(_Z) -> deflateParams(Z, Level0, Strategy0) -> Level = arg_level(Level0), Strategy = arg_strategy(Strategy0), + Progress = deflate(Z, <<>>, sync), case deflateParams_nif(Z, Level, Strategy) of - buf_error -> - %% We had data left in the pipe; flush everything and stash it away - %% for the next deflate call before trying again. - Output = deflate(Z, <<>>, full), - save_progress(Z, deflate, Output), - deflateParams_nif(Z, Level, Strategy); - Any -> Any + ok -> + save_progress(Z, deflate, Progress), + ok; + Other -> + Other end. deflateParams_nif(_Z, _Level, _Strategy) -> erlang:nif_error(undef). |