Skip to content

Commit

Permalink
qf-fmt: re-indent after fixing TABs issue (2600hz#2485)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp authored and lazedo committed Aug 24, 2016
1 parent 591c94b commit 726753a
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion applications/callflow/src/cf_flow.erl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ test_callflow_patterns([#pattern{regex=Regex}=Pattern |T], Number, {Matched, P}=
{'match', Groups} ->
case hd(lists:sort(fun(A, B) -> byte_size(A) >= byte_size(B) end, Groups)) of
Match when P =:= 'undefined'
orelse byte_size(Match) > byte_size(Matched) ->
orelse byte_size(Match) > byte_size(Matched) ->
test_callflow_patterns(T, Number, {Match, Pattern});
_ -> test_callflow_patterns(T, Number, Result)
end;
Expand Down
28 changes: 14 additions & 14 deletions applications/ecallmgr/src/ecallmgr_call_command.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1431,20 +1431,20 @@ record_call_vars(JObj) ->
SampleRate = get_sample_rate(JObj),

lists:foldl(fun(F, V) -> F(V) end
,[{<<"RECORD_APPEND">>, <<"true">>}
,{<<"enable_file_write_buffering">>, <<"false">>}
,{<<"RECORD_STEREO">>, should_record_stereo(JObj)}
,{<<"RECORD_SOFTWARE">>, ?RECORD_SOFTWARE}
,{<<"recording_follow_transfer">>, FollowTransfer}
,{<<"recording_follow_attxfer">>, FollowTransfer}
,{<<"Record-Min-Sec">>, RecordMinSec}
,{<<"record_sample_rate">>, kz_util:to_binary(SampleRate)}
,{<<"Media-Recorder">>, kz_json:get_value(<<"Media-Recorder">>, JObj)}
,{<<"Time-Limit">>, kz_json:get_value(<<"Time-Limit">>, JObj)}
,{<<"Media-Name">>, kz_json:get_value(<<"Media-Name">>, JObj)}
,{<<"Media-Recording-ID">>, kz_json:get_value(<<"Media-Recording-ID">>, JObj)}
]
,Routines
,[{<<"RECORD_APPEND">>, <<"true">>}
,{<<"enable_file_write_buffering">>, <<"false">>}
,{<<"RECORD_STEREO">>, should_record_stereo(JObj)}
,{<<"RECORD_SOFTWARE">>, ?RECORD_SOFTWARE}
,{<<"recording_follow_transfer">>, FollowTransfer}
,{<<"recording_follow_attxfer">>, FollowTransfer}
,{<<"Record-Min-Sec">>, RecordMinSec}
,{<<"record_sample_rate">>, kz_util:to_binary(SampleRate)}
,{<<"Media-Recorder">>, kz_json:get_value(<<"Media-Recorder">>, JObj)}
,{<<"Time-Limit">>, kz_json:get_value(<<"Time-Limit">>, JObj)}
,{<<"Media-Name">>, kz_json:get_value(<<"Media-Name">>, JObj)}
,{<<"Media-Recording-ID">>, kz_json:get_value(<<"Media-Recording-ID">>, JObj)}
]
,Routines
).

-spec maybe_waste_resources(kz_proplist()) -> kz_proplist().
Expand Down
24 changes: 12 additions & 12 deletions applications/ecallmgr/src/ecallmgr_fs_node_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,18 @@
-define(NODE_SUPERVISOR, ?NODE_CHILD_TYPE(<<"supervisor">>)).

-define(CHILDREN, kz_json:from_list(
[{<<"node">>, ?NODE_WORKER}
,{<<"authn">>, ?NODE_WORKER}
,{<<"channel">>, ?NODE_WORKER}
,{<<"conference">>, ?NODE_WORKER}
,{<<"config">>, ?NODE_WORKER}
,{<<"event_stream_sup">>, ?NODE_SUPERVISOR}
,{<<"msg">>, ?NODE_WORKER}
,{<<"notify">>, ?NODE_WORKER}
,{<<"recordings">>, ?NODE_WORKER}
,{<<"resource">>, ?NODE_WORKER}
,{<<"route_sup">>, ?NODE_SUPERVISOR}
])).
[{<<"node">>, ?NODE_WORKER}
,{<<"authn">>, ?NODE_WORKER}
,{<<"channel">>, ?NODE_WORKER}
,{<<"conference">>, ?NODE_WORKER}
,{<<"config">>, ?NODE_WORKER}
,{<<"event_stream_sup">>, ?NODE_SUPERVISOR}
,{<<"msg">>, ?NODE_WORKER}
,{<<"notify">>, ?NODE_WORKER}
,{<<"recordings">>, ?NODE_WORKER}
,{<<"resource">>, ?NODE_WORKER}
,{<<"route_sup">>, ?NODE_SUPERVISOR}
])).

%% ===================================================================
%% API functions
Expand Down
8 changes: 4 additions & 4 deletions applications/ecallmgr/src/ecallmgr_fs_recordings.erl
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ process_specific_event(_Event, _UUID, _Props, _Node) ->
lager:debug("event ~s for callid ~s not handled in recordings (~s)", [_Event, _UUID, _Node]).

-spec maybe_store_recording(api_binary(), kz_proplist(), ne_binary(), atom()) ->
'ok' |
'error' |
ecallmgr_util:send_cmd_ret() |
[ecallmgr_util:send_cmd_ret(),...].
'ok' |
'error' |
ecallmgr_util:send_cmd_ret() |
[ecallmgr_util:send_cmd_ret(),...].
maybe_store_recording(<<"kz_media_recording">>, _Props, _CallId, _Node) -> 'ok';
maybe_store_recording(_, Props, CallId, Node) ->
case kzd_freeswitch:ccv(Props, <<"Media-Transfer-Destination">>) of
Expand Down
4 changes: 2 additions & 2 deletions applications/ecallmgr/src/ecallmgr_fs_router_call.erl
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ process_route_req(Section, Node, FetchId, CallId, Props) ->
do_process_route_req(Section, Node, FetchId, CallId, Props) ->
Filtered = ecallmgr_fs_loopback:filter(Node, CallId, Props),
case ecallmgr_fs_router_util:search_for_route(Section, Node, FetchId, CallId, Filtered) of
'ok' ->
'ok' ->
lager:debug("xml fetch dialplan ~s finished without success", [FetchId]);
{'ok', JObj} ->
{'ok', JObj} ->
ecallmgr_fs_channels:update(CallId, #channel.handling_locally, 'true'),
maybe_start_call_handling(Node, FetchId, CallId, JObj)
end.
Expand Down
6 changes: 3 additions & 3 deletions applications/ecallmgr/src/ecallmgr_fs_router_text.erl
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ add_message_missing_props(Props) ->
,{<<"Caller-Caller-ID-Number">>, props:get_value(<<"from_user">>, Props)}
,{<<"Caller-Destination-Number">>, props:get_value(<<"to_user">>, Props)}
]
,Props
,Props
).

-spec expand_message_vars(kz_proplist()) -> kz_proplist().
Expand All @@ -210,9 +210,9 @@ process_route_req(Section, Node, FetchId, MsgId, Props) ->
-spec do_process_route_req(atom(), atom(), ne_binary(), ne_binary(), kz_proplist()) -> 'ok'.
do_process_route_req(Section, Node, FetchId, MsgId, Props) ->
case ecallmgr_fs_router_util:search_for_route(Section, Node, FetchId, MsgId, Props) of
'ok' ->
'ok' ->
lager:debug("xml fetch chatplan ~s finished without success", [FetchId]);
{'ok', JObj} ->
{'ok', JObj} ->
start_message_handling(Node, FetchId, MsgId, JObj)
end.

Expand Down
6 changes: 3 additions & 3 deletions applications/ecallmgr/src/ecallmgr_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ get_sip_from(Props, <<"outbound">>) ->
,<<"variable_sip_req_uri">>
,<<"variable_sip_from_uri">>
]
,Props
,<<User/binary, "@", Realm/binary>>
);
,Props
,<<User/binary, "@", Realm/binary>>
);
get_sip_from(Props, _) ->
Default = <<(props:get_value(<<"variable_sip_from_user">>, Props, <<"nouser">>))/binary
,"@"
Expand Down
8 changes: 4 additions & 4 deletions applications/omnipresence/src/omnip_subscriptions.erl
Original file line number Diff line number Diff line change
Expand Up @@ -372,15 +372,15 @@ subscribe_notify(#omnip_subscription{event=Package

-spec probe(subscription()) -> 'ok'.
probe(#omnip_subscription{event=Package
,user=User
}=Subscription) ->
,user=User
}=Subscription) ->
Msg = {'omnipresence', {'probe', Package, User, Subscription}},
notify_packages(Msg).

-spec maybe_probe(subscription()) -> 'ok'.
maybe_probe(#omnip_subscription{event=Package
,user=User
}=Subscription) ->
,user=User
}=Subscription) ->
case count_subscriptions(Package, User) > 1 of
'true' -> 'ok';
'false' -> probe(Subscription)
Expand Down
2 changes: 1 addition & 1 deletion applications/omnipresence/src/omnip_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ request_probe(Package, Username, Realm) ->
API = [{<<"Event-Package">>, Package}
,{<<"Username">>, Username}
,{<<"Realm">>, Realm}
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
| kz_api:default_headers(?APP_NAME, ?APP_VERSION)
],
kz_amqp_worker:cast(API, fun kapi_presence:publish_probe/1).
60 changes: 30 additions & 30 deletions core/kazoo/src/api/kapi_metaflow.erl
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,25 @@
-define(METAFLOW_ACTION_HEADERS, [<<"Action">>, <<"Call-ID">>]).
-define(OPTIONAL_METAFLOW_ACTION_HEADERS, [<<"Data">>]).
-define(METAFLOW_ACTION_VALUES, [{<<"Event-Category">>, <<"metaflow">>}
,{<<"Event-Name">>, <<"action">>}
,{<<"Action">>, [<<"transfer">>
,<<"hangup">>
,<<"callflow">>
,<<"break">>
,<<"intercept">>
,<<"move">>
,<<"park">>
,<<"unpark">>
,<<"play">>
,<<"say">>
,<<"audio_level">>
,<<"hold">>
,<<"record_call">>
,<<"resume">>
,<<"tts">>
]
}
]).
,{<<"Event-Name">>, <<"action">>}
,{<<"Action">>, [<<"transfer">>
,<<"hangup">>
,<<"callflow">>
,<<"break">>
,<<"intercept">>
,<<"move">>
,<<"park">>
,<<"unpark">>
,<<"play">>
,<<"say">>
,<<"audio_level">>
,<<"hold">>
,<<"record_call">>
,<<"resume">>
,<<"tts">>
]
}
]).
-define(METAFLOW_ACTION_TYPES, []).

-define(METAFLOW_ACTION_ROUTING_KEY(CallId, Action)
Expand Down Expand Up @@ -79,14 +79,14 @@
,<<"Endpoint-ID">>, <<"Listen-On">>
]).
-define(METAFLOW_BIND_VALUES, [{<<"Event-Category">>, <<"metaflow">>}
,{<<"Event-Name">>, <<"bind">>}
,{<<"Binding-Digit">>, ?ANY_DIGIT}
,{<<"Listen-On">>, [<<"both">>, <<"self">>, <<"peer">>, <<"aleg">>, <<"bleg">>]}
]).
,{<<"Event-Name">>, <<"bind">>}
,{<<"Binding-Digit">>, ?ANY_DIGIT}
,{<<"Listen-On">>, [<<"both">>, <<"self">>, <<"peer">>, <<"aleg">>, <<"bleg">>]}
]).
-define(METAFLOW_BIND_TYPES, [{<<"Numbers">>, fun kz_json:is_json_object/1}
,{<<"Patterns">>, fun kz_json:is_json_object/1}
,{<<"Digit-Timeout">>, fun binding_digit_timeout_v/1}
]).
,{<<"Patterns">>, fun kz_json:is_json_object/1}
,{<<"Digit-Timeout">>, fun binding_digit_timeout_v/1}
]).
-define(METAFLOW_BIND_ROUTING_KEY(AccountId, CallId), <<"metaflow.bind.", (amqp_util:encode(AccountId))/binary, ".", (amqp_util:encode(CallId))/binary>>).

%%--------------------------------------------------------------------
Expand All @@ -95,8 +95,8 @@
%% @end
%%--------------------------------------------------------------------
-spec action(kz_json:object() | kz_proplist()) ->
{'ok', iolist()} |
{'error', string()}.
{'ok', iolist()} |
{'error', string()}.
action(Prop) when is_list(Prop) ->
case action_v(Prop) of
'true' -> kz_api:build_message(Prop, ?METAFLOW_ACTION_HEADERS, ?OPTIONAL_METAFLOW_ACTION_HEADERS);
Expand All @@ -116,8 +116,8 @@ action_v(JObj) -> action_v(kz_json:to_proplist(JObj)).
%% @end
%%--------------------------------------------------------------------
-spec bind_req(kz_json:object() | kz_proplist()) ->
{'ok', iolist()} |
{'error', string()}.
{'ok', iolist()} |
{'error', string()}.
bind_req(Prop) when is_list(Prop) ->
case bind_req_v(Prop) of
'true' -> kz_api:build_message(Prop, ?METAFLOW_BIND_REQ_HEADERS, ?OPTIONAL_METAFLOW_BIND_REQ_HEADERS);
Expand Down
4 changes: 2 additions & 2 deletions core/kazoo_documents/src/kzd_callflow.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
-module(kzd_callflow).

-export([new/0
,type/0
,is_feature_code/1
,type/0
,is_feature_code/1
,flow/1, flow/2
,set_flow/2, validate_flow/1
]).
Expand Down
6 changes: 3 additions & 3 deletions core/sup/priv/build-autocomplete.escript
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ dump(CompFile) ->
'ok' = file:write(Dev, case_sup()),

lists:foreach(
fun (M) ->
'ok' = file:write(Dev, case_prev(M))
end, get('modules')),
fun (M) ->
'ok' = file:write(Dev, case_prev(M))
end, get('modules')),
'ok' = file:write(Dev, "\n"
" *) args ;;\n"
" esac\n"
Expand Down

0 comments on commit 726753a

Please sign in to comment.