Changeset View
Changeset View
Standalone View
Standalone View
apps/kolab_guam/src/kolab_guam_session.erl
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | |||||
apply_next_rule_serverside(_ImapSession, ServerData, ActiveRulesAcc, []) -> { ServerData, lists:reverse(ActiveRulesAcc) }; | apply_next_rule_serverside(_ImapSession, ServerData, ActiveRulesAcc, []) -> { ServerData, lists:reverse(ActiveRulesAcc) }; | ||||
apply_next_rule_serverside(ImapSession, ServerData, ActiveRulesAcc, [{ Module, RuleState } | ActiveRules]) -> | apply_next_rule_serverside(ImapSession, ServerData, ActiveRulesAcc, [{ Module, RuleState } | ActiveRules]) -> | ||||
%TODO: allow rules to remove themselves from the action during serverside processing? | %TODO: allow rules to remove themselves from the action during serverside processing? | ||||
{ ModifiedData, ModifiedRuleState } = Module:apply_to_server_message(ImapSession, ServerData, RuleState), | { ModifiedData, ModifiedRuleState } = Module:apply_to_server_message(ImapSession, ServerData, RuleState), | ||||
apply_next_rule_serverside(ImapSession, ModifiedData, [{ Module, ModifiedRuleState } | ActiveRulesAcc], ActiveRules). | apply_next_rule_serverside(ImapSession, ModifiedData, [{ Module, ModifiedRuleState } | ActiveRulesAcc], ActiveRules). | ||||
apply_ruleset_clientside(_ImapSession, _Socket, ClientData, _CurrentCommandSplit, [], []) -> | apply_ruleset_clientside(_ImapSession, _Socket, ClientData, _CurrentCommandSplit, [], []) -> | ||||
{ ClientData, [], [], perform_passthrough, undefined }; | { ClientData, [], [], [], [], perform_passthrough }; | ||||
apply_ruleset_clientside(ImapSession, Socket, ClientData, CurrentCommandSplit, UndecidedRules, CurrentlyActiveRules) -> | apply_ruleset_clientside(ImapSession, Socket, ClientData, CurrentCommandSplit, UndecidedRules, CurrentlyActiveRules) -> | ||||
{ PostAction, SplitCommand, SplitResetTrigger } = | { PostAction, SplitCommand, SplitResetTrigger } = | ||||
case CurrentCommandSplit of | case CurrentCommandSplit of | ||||
undefined -> | undefined -> | ||||
case eimap_utils:split_command_into_components(ClientData) of | case eimap_utils:split_command_into_components(ClientData) of | ||||
{ _Tag, <<>>, <<>> } -> { buffer_data, undefined, reset_for_next_client_command }; | { _Tag, <<>>, <<>> } -> { buffer_data, undefined, reset_for_next_client_command }; | ||||
{ _Tag, Command, _Data } = Split -> { perform_passthrough, Split, when_to_reset_split(Command) } | { _Tag, Command, _Data } = Split -> { perform_passthrough, Split, when_to_reset_split(Command) } | ||||
end; | end; | ||||
▲ Show 20 Lines • Show All 149 Lines • Show Last 20 Lines |