tabs -> spaces

This commit is contained in:
Matthias Radestock 2009-06-18 15:54:55 +01:00
parent 203aeae69f
commit 10bec70734
6 changed files with 25 additions and 25 deletions

View File

@ -136,7 +136,7 @@ start(normal, []) ->
ok = rabbit_amqqueue:start(),
{ok, MemoryAlarms} = application:get_env(memory_alarms),
{ok, MemoryAlarms} = application:get_env(memory_alarms),
ok = rabbit_alarm:start(MemoryAlarms),
ok = rabbit_binary_generator:
@ -304,7 +304,7 @@ rotate_logs(File, Suffix, OldHandler, NewHandler) ->
log_rotation_result({error, MainLogError}, {error, SaslLogError}) ->
{error, {{cannot_rotate_main_logs, MainLogError},
{cannot_rotate_sasl_logs, SaslLogError}}};
{cannot_rotate_sasl_logs, SaslLogError}}};
log_rotation_result({error, MainLogError}, ok) ->
{error, {cannot_rotate_main_logs, MainLogError}};
log_rotation_result(ok, {error, SaslLogError}) ->

View File

@ -245,8 +245,8 @@ add_vhost(VHostPath) ->
[{<<"">>, direct},
{<<"amq.direct">>, direct},
{<<"amq.topic">>, topic},
{<<"amq.match">>, headers}, %% per 0-9-1 pdf
{<<"amq.headers">>, headers}, %% per 0-9-1 xml
{<<"amq.match">>, headers}, %% per 0-9-1 pdf
{<<"amq.headers">>, headers}, %% per 0-9-1 xml
{<<"amq.fanout">>, fanout}]],
ok;
[_] ->

View File

@ -235,9 +235,9 @@ route(X = #exchange{type = topic}, RoutingKey, _Content) ->
route(X = #exchange{type = headers}, _RoutingKey, Content) ->
Headers = case (Content#content.properties)#'P_basic'.headers of
undefined -> [];
H -> sort_arguments(H)
end,
undefined -> [];
H -> sort_arguments(H)
end,
match_bindings(X, fun (#binding{args = Spec}) ->
headers_match(Spec, Headers)
end);
@ -489,14 +489,14 @@ parse_x_match(Other) ->
%%
headers_match(Pattern, Data) ->
MatchKind = case lists:keysearch(<<"x-match">>, 1, Pattern) of
{value, {_, longstr, MK}} -> parse_x_match(MK);
{value, {_, Type, MK}} ->
rabbit_log:warning("Invalid x-match field type ~p "
{value, {_, longstr, MK}} -> parse_x_match(MK);
{value, {_, Type, MK}} ->
rabbit_log:warning("Invalid x-match field type ~p "
"(value ~p); expected longstr",
[Type, MK]),
default_headers_match_kind();
_ -> default_headers_match_kind()
end,
[Type, MK]),
default_headers_match_kind();
_ -> default_headers_match_kind()
end,
headers_match(Pattern, Data, true, false, MatchKind).
headers_match([], _Data, AllMatch, _AnyMatch, all) ->
@ -523,8 +523,8 @@ headers_match([{PK, PT, PV} | PRest], [{DK, DT, DV} | DRest],
%% the corresponding data field. I've interpreted that to
%% mean a type of "void" for the pattern field.
PT == void -> {AllMatch, true};
%% Similarly, it's not specified, but I assume that a
%% mismatched type causes a mismatched value.
%% Similarly, it's not specified, but I assume that a
%% mismatched type causes a mismatched value.
PT =/= DT -> {false, AnyMatch};
PV == DV -> {AllMatch, true};
true -> {false, AnyMatch}

View File

@ -75,7 +75,7 @@ debug(Fmt, Args) when is_list(Args) ->
message(Direction, Channel, MethodRecord, Content) ->
gen_server:cast(?SERVER,
{message, Direction, Channel, MethodRecord, Content}).
{message, Direction, Channel, MethodRecord, Content}).
info(Fmt) ->
gen_server:cast(?SERVER, {info, Fmt}).
@ -112,11 +112,11 @@ handle_cast({debug, Fmt, Args}, State) ->
{noreply, State};
handle_cast({message, Direction, Channel, MethodRecord, Content}, State) ->
io:format("~s ch~p ~p~n",
[case Direction of
in -> "-->";
out -> "<--" end,
Channel,
{MethodRecord, Content}]),
[case Direction of
in -> "-->";
out -> "<--" end,
Channel,
{MethodRecord, Content}]),
{noreply, State};
handle_cast({info, Fmt}, State) ->
error_logger:info_msg(Fmt),

View File

@ -231,7 +231,7 @@ start_connection(Parent, Deb, ClientSock) ->
connection_state = pre_init},
handshake, 8))
catch
Ex -> (if Ex == connection_closed_abruptly ->
Ex -> (if Ex == connection_closed_abruptly ->
fun rabbit_log:warning/2;
true ->
fun rabbit_log:error/2

View File

@ -261,7 +261,7 @@ test_log_management() ->
%% original log files are not writable
ok = make_files_non_writable([MainLog, SaslLog]),
{error, {{cannot_rotate_main_logs, _},
{cannot_rotate_sasl_logs, _}}} = control_action(rotate_logs, []),
{cannot_rotate_sasl_logs, _}}} = control_action(rotate_logs, []),
%% logging directed to tty (handlers were removed in last test)
ok = clean_logs([MainLog, SaslLog], Suffix),
@ -280,7 +280,7 @@ test_log_management() ->
ok = application:set_env(sasl, sasl_error_logger, {file, SaslLog}),
ok = application:set_env(kernel, error_logger, {file, MainLog}),
ok = add_log_handlers([{rabbit_error_logger_file_h, MainLog},
{rabbit_sasl_report_file_h, SaslLog}]),
{rabbit_sasl_report_file_h, SaslLog}]),
passed.
test_log_management_during_startup() ->