Projects
home:dhoffend:branches:home:mollekopf:branches:Kolab:Winterfell
guam
0001-Instead-of-converting-the-values-from-zlib...
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Instead-of-converting-the-values-from-zlib-deflate-t.patch of Package guam
From ae6f2abb47a320475cbc9909ca77789208962672 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf <mollekopf@kolabsys.com> Date: Sat, 28 Mar 2020 08:15:08 +0100 Subject: [PATCH] Instead of converting the values from zlib:deflate to binary by hand we can use the iolist_to_binary() function from erlang; this allows us to convert also nested iolists. Summary: Patch by hede Differential Revision: https://git.kolab.org/D1090 --- apps/kolab_guam/src/kolab_guam_session.erl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/kolab_guam/src/kolab_guam_session.erl b/apps/kolab_guam/src/kolab_guam_session.erl index e547c55..924055e 100644 --- a/apps/kolab_guam/src/kolab_guam_session.erl +++ b/apps/kolab_guam/src/kolab_guam_session.erl @@ -238,17 +238,14 @@ process_client_data(Socket, Data, #state{ rules_deciding = UndecidedRules, tls_c preprocess_client_data(undefined, Data, #state{ buffered_client_data = Buffered }) -> <<Buffered/binary, Data/binary>>; preprocess_client_data(Z, Data, #state{ buffered_client_data = Buffered }) -> - Inflated = joined(zlib:inflate(Z, Data), <<>>), + Inflated = iolist_to_binary(zlib:inflate(Z, Data)), <<Buffered/binary, Inflated/binary>>. postprocess_server_data(undefined, Data) -> %% we aren't compressing so there is nothing to do Data; postprocess_server_data(Z, Data) -> - joined(zlib:deflate(Z, Data, sync), <<>>). - -joined([], Binary) -> Binary; -joined([H|Rest], Binary) -> joined(Rest, <<Binary/binary, H/binary>>). + iolist_to_binary(zlib:deflate(Z, Data, sync)). init_rules(RuleConfig) -> init_rule(RuleConfig, []). init_rule([], Acc) -> Acc; -- 2.20.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.