Projects
Kolab:Winterfell
erlang-eimap
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 18
View file
erlang-eimap.spec
Changed
@@ -5,7 +5,7 @@ %global realname eimap %global debug_package %{nil} -%define lock_version() %{1}%{?_isa} = %(rpm -q --queryformat "%{VERSION}" %{1}) +%define lock_version() %{1}%{?_isa} = %(rpm -q --queryformat "%%{VERSION}" %{1}) Name: erlang-%{realname} Version: 0.4.0 @@ -19,7 +19,8 @@ %endif Source0: erlang-eimap-%{version}.tar.gz -Patch1: make-things-easy-for-rebar3.patch +Patch1: untagged-commands.patch +Patch2: make-things-easy-for-rebar3.patch BuildRequires: erlang-goldrush BuildRequires: erlang-lager @@ -35,6 +36,7 @@ %setup -q -n eimap-%{version} %patch1 -p1 +%patch2 -p1 %build DEBUG=1 @@ -74,9 +76,12 @@ %{_libdir}/erlang/lib/%{realname}-%{version}/ebin/*.beam %changelog -* Mon Nov 21 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.4.0-1 +* Sun Apr 08 2018 Christoph Erhardt <kolab@sicherha.de> - 0.4.0-1 - Upstream release 0.4.0 +* Tue Nov 7 2017 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.2.5-5 +- Patch untagged commands + * Tue Jul 5 2016 Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> - 0.2.5-1 - Packaging of 0.2.5
View file
untagged-commands.patch
Added
@@ -0,0 +1,43 @@ +diff --git a/src/eimap_utils.erl b/src/eimap_utils.erl +index 163229b..230ab60 100644 +--- a/src/eimap_utils.erl ++++ b/src/eimap_utils.erl +@@ -156,14 +156,20 @@ remove_tag_from_response(Buffer, Tag, trust) -> + %% Private + split_command(<<>>) -> { <<>>, <<>>, <<>> }; + split_command(Buffer) -> +- End = eol_found(Buffer, binary:match(Buffer, <<"\r\n">>)), ++ {Terminated, End} = eol_found(Buffer, binary:match(Buffer, <<"\r\n">>)), + { Tag, CommandStart } = searched_in_buffer(Buffer, 0, End, binary:match(Buffer, <<" ">>, [ { scope, { 0, End } } ])), +- { Command, DataStart } = searched_in_buffer(Buffer, CommandStart, End, binary:match(Buffer, <<" ">>, [ { scope, { CommandStart, End - CommandStart } } ])), +- Data = binary:part(Buffer, DataStart, End - (DataStart)), +- { Tag, Command, Data }. ++ case Terminated of ++ true when End == CommandStart -> ++ %% when we have a newline, and the tag takes the entire line, the "tag" is actually the command ++ {<<>>, Tag, <<>>}; ++ _ -> ++ { Command, DataStart } = searched_in_buffer(Buffer, CommandStart, End, binary:match(Buffer, <<" ">>, [ { scope, { CommandStart, End - CommandStart } } ])), ++ Data = binary:part(Buffer, DataStart, End - (DataStart)), ++ { Tag, Command, Data } ++ end. + +-eol_found(Buffer, nomatch) -> size(Buffer); +-eol_found(_Buffer, { MatchStart, _MatchLength }) -> MatchStart. ++eol_found(Buffer, nomatch) -> {false, size(Buffer)}; ++eol_found(_Buffer, { MatchStart, _MatchLength }) -> {true, MatchStart}. + + searched_in_buffer(Buffer, Start, End, nomatch) -> { binary:part(Buffer, Start, End - Start), End }; + searched_in_buffer(Buffer, Start, _End, { MatchStart, MatchLength } ) -> { binary:part(Buffer, Start, MatchStart - Start), MatchStart + MatchLength }. +diff --git a/test/eimap_utils_tests.erl b/test/eimap_utils_tests.erl +index 389be6f..81631c1 100644 +--- a/test/eimap_utils_tests.erl ++++ b/test/eimap_utils_tests.erl +@@ -79,6 +79,7 @@ split_command_into_components_test_() -> + Data = + [ + { { <<>>, <<>>, <<>> }, <<>> }, ++ { { <<>>, <<"DONE">>, <<>> }, <<"DONE\r\n">> }, + { { <<".">>, <<"LIST">>, <<"\"\" \"*\"">> }, <<". LIST \"\" \"*\"">> }, + { { <<"1">>, <<"STARTTLS">>, <<>> }, <<"1 STARTTLS">> }, + { { <<"1">>, <<"STARTTLS">>, <<>> }, <<"1 STARTTLS\r\n">> },
View file
debian.changelog
Changed
@@ -2,7 +2,19 @@ * Package the 0.4.0 release - -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Mon, 21 Nov 2016 10:30:50 +0100 + -- Christoph Erhardt <kolab@sicherha.de> Sun, 08 Apr 2018 00:44:10 +0200 + +erlang-eimap (0.2.5-3) unstable; urgency=medium + + * Patch untagged commands + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Tue, 7 Nov 2017 10:30:50 +0100 + +erlang-eimap (0.2.5-2) unstable; urgency=medium + + * Rebuild + + -- Jeroen van Meeuwen <vanmeeuwen@kolabsys.com> Tue, 29 Aug 2017 10:30:50 +0100 erlang-eimap (0.2.5-1) unstable; urgency=medium
View file
debian.series
Changed
@@ -1,1 +1,2 @@ +untagged-commands.patch -p1 make-things-easy-for-rebar3.patch -p1
View file
erlang-eimap.dsc
Changed
@@ -6,7 +6,7 @@ Maintainer: Christoph Erhardt <kolab@sicherha.de> Homepage: https://git.kolab.org/diffusion/EI/eimap.git Standards-Version: 3.9.6 -Build-Depends: debhelper (>= 9), erlang-goldrush, erlang-lager, erlang-rebar3 (>= 3.3.2), erlang-crypto +Build-Depends: debhelper (>= 9), erlang-goldrush (>= 0.1.7), erlang-lager (>= 2.2.0), erlang-rebar3 (>= 3.3.2), erlang-crypto Package-List: erlang-eimap deb devel extra Files:
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
.