diff options
author | Matthias Radestock <matthias@lshift.net> | 2009-06-18 15:54:55 +0100 |
---|---|---|
committer | Matthias Radestock <matthias@lshift.net> | 2009-06-18 15:54:55 +0100 |
commit | eb443683546708506689482d6e10a72c140f2a25 (patch) | |
tree | b9a4c2dd9344003086d7d47e4d64683290e4aba1 | |
parent | 323102f930e949b06784aad233c0d057ef755a1a (diff) | |
download | rabbitmq-server-eb443683546708506689482d6e10a72c140f2a25.tar.gz |
tabs -> spaces
-rw-r--r-- | src/rabbit.erl | 4 | ||||
-rw-r--r-- | src/rabbit_access_control.erl | 4 | ||||
-rw-r--r-- | src/rabbit_exchange.erl | 24 | ||||
-rw-r--r-- | src/rabbit_log.erl | 12 | ||||
-rw-r--r-- | src/rabbit_reader.erl | 2 | ||||
-rw-r--r-- | src/rabbit_tests.erl | 4 |
6 files changed, 25 insertions, 25 deletions
diff --git a/src/rabbit.erl b/src/rabbit.erl index 1ddb5151..196212ea 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -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}) -> diff --git a/src/rabbit_access_control.erl b/src/rabbit_access_control.erl index 99b912ec..6ff7a104 100644 --- a/src/rabbit_access_control.erl +++ b/src/rabbit_access_control.erl @@ -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; [_] -> diff --git a/src/rabbit_exchange.erl b/src/rabbit_exchange.erl index 7d9948f0..8fb9eae3 100644 --- a/src/rabbit_exchange.erl +++ b/src/rabbit_exchange.erl @@ -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} diff --git a/src/rabbit_log.erl b/src/rabbit_log.erl index f408336e..dd5b498b 100644 --- a/src/rabbit_log.erl +++ b/src/rabbit_log.erl @@ -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), diff --git a/src/rabbit_reader.erl b/src/rabbit_reader.erl index ef8038e7..426b99eb 100644 --- a/src/rabbit_reader.erl +++ b/src/rabbit_reader.erl @@ -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 diff --git a/src/rabbit_tests.erl b/src/rabbit_tests.erl index 8f0a3a89..01757509 100644 --- a/src/rabbit_tests.erl +++ b/src/rabbit_tests.erl @@ -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() -> |