Projects
Kolab:Winterfell
guam
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 52
View file
guam.spec
Changed
@@ -31,6 +31,7 @@ Patch9991: make-it-very-easy-on-rebar3.patch Patch9992: guam-priv-no-delete.patch +Patch9993: guam-0.9.2-stalling-client-buffer-and-split-command-handling.patch BuildRequires: erlang >= 17.4 BuildRequires: erlang-asn1 @@ -96,6 +97,7 @@ %patch9991 -p1 %patch9992 -p1 +%patch9993 -p1 sed -i 's/"0\.9\.0"/"%{version}"/' rebar.config @@ -224,8 +226,8 @@ %endif %changelog -* Mon May 07 2018 Christoph Erhardt <kolab@sicherha.de> - 0.9.4-6 -- Trigger rebuild due to updated erlang-lager package +* Tue May 08 2018 Christoph Erhardt <kolab@sicherha.de> - 0.9.4-6 +- Apply patch that fixes stalling client buffers and handling of split commands * Fri May 04 2018 Christoph Erhardt <kolab@sicherha.de> - 0.9.4-5 - Make logs go to /var/log/guam
View file
guam-0.9.2-stalling-client-buffer-and-split-command-handling.patch
Added
@@ -0,0 +1,54 @@ +diff --git a/apps/kolab_guam/src/kolab_guam_session.erl b/apps/kolab_guam/src/kolab_guam_session.erl +index ca4e633..e547c55 100644 +--- a/apps/kolab_guam/src/kolab_guam_session.erl ++++ b/apps/kolab_guam/src/kolab_guam_session.erl +@@ -201,19 +201,37 @@ process_client_data(Socket, Data, #state{ rules_deciding = UndecidedRules, tls_c + BufferThisData = + case PostAction of + perform_passthrough -> ++ %lager:info("sending (no buffer): ~s", [ModifiedData]), + eimap:passthrough_data(ImapSession, ModifiedData), + <<>>; + buffer_data -> +- Data ++ % Originally Aaron uses Data here, but later on this buffer is assumed to be ++ % already decoded, so we do have to use PreprocessData here, I think. ++ case binary:matches(PreprocessData, <<"\r\n">>) of ++ [] -> ++ %lager:info("buffering: ~s", [PreprocessData]), ++ PreprocessData; ++ List -> ++ {FoundPos, _} = lists:last(List), ++ % I would like to have some binary:match for the last instead of the ++ % first occurrence; but I'm really inexperienced in erlang so I don't ++ % know how to solve this efficiently, so I'm using binary:matches with ++ % using the last element only ++ SplitPos = FoundPos + 2, ++ eimap:passthrough_data(ImapSession, binary:part(PreprocessData, 0, SplitPos)), ++ %lager:info("sending first part: ~s", [binary:part(PreprocessData, 0, SplitPos)] ), ++ %lager:info("buffering second part: ~s", [binary:part(PreprocessData, SplitPos, size(PreprocessData)-SplitPos)]), ++ binary:part(PreprocessData, SplitPos, size(PreprocessData)-SplitPos) ++ end + end, + { TLS, Socket, Inflator, Deflator, NewUndecidedRules, NewActiveRules, BufferThisData, NewSplitCommand, NewSplitResetTrigger } + end, + set_socket_active(TLSActive, CurrentSocket), +- PrevBuffered = State#state.buffered_client_data, ++ %buffered_client_data is already in DataToBuffer via preprocess_client_data + { noreply, State#state{ rules_deciding = CurrentUndecidedRules, rules_active = CurrentActiveRules, + socket = CurrentSocket, client_tls_active = TLSActive, + inflator = CurrentInflator, deflator = CurrentDeflator, +- buffered_client_data = <<PrevBuffered/binary, DataToBuffer/binary>>, ++ buffered_client_data = <<DataToBuffer/binary>>, + current_command_split = SplitCommand, + command_split_reset_trigger = SplitResetTrigger } }. + +@@ -261,7 +279,7 @@ apply_next_rule_serverside(ImapSession, ServerData, ActiveRulesAcc, [{ Module, R + apply_next_rule_serverside(ImapSession, ModifiedData, [{ Module, ModifiedRuleState } | ActiveRulesAcc], ActiveRules). + + apply_ruleset_clientside(_ImapSession, _Socket, ClientData, _CurrentCommandSplit, [], []) -> +- { ClientData, [], [], [], [], perform_passthrough }; ++ { ClientData, undefined, [], [], [], perform_passthrough }; + apply_ruleset_clientside(ImapSession, Socket, ClientData, CurrentCommandSplit, UndecidedRules, CurrentlyActiveRules) -> + { PostAction, SplitCommand, SplitResetTrigger } = + case CurrentCommandSplit of
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +guam (0.9.4-6) unstable; urgency=medium + + * Apply patch that fixes stalling client buffers and handling of split commands + + -- Christoph Erhardt <kolab@sicherha.de> Tue, 08 May 2018 09:31:31 +0200 + guam (0.9.4-5) unstable; urgency=medium * Add erlang-eimap to guam-bundled-libs
View file
debian.series
Changed
@@ -1,2 +1,3 @@ make-it-very-easy-on-rebar3.patch -p1 guam-priv-no-delete.patch -p1 +guam-0.9.2-stalling-client-buffer-and-split-command-handling.patch -p1
View file
guam.dsc
Changed
@@ -2,7 +2,7 @@ Source: guam Binary: guam Architecture: any -Version: 0.9.4-5 +Version: 0.9.4-6 Maintainer: Christoph Erhardt <kolab@sicherha.de> Homepage: https://kolab.org/about/guam Standards-Version: 3.9.6
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
.