diff options
| author | Emile Joubert <emile@rabbitmq.com> | 2013-09-04 16:59:45 +0100 |
|---|---|---|
| committer | Emile Joubert <emile@rabbitmq.com> | 2013-09-04 16:59:45 +0100 |
| commit | 2e92b56d76be85d12813a52b891bb7555d6e9672 (patch) | |
| tree | 2a80f0124cc47a32293847d4ee8fb941cb7dde21 /src | |
| parent | cfcf0ef4e57ac3a5c71153e0e3624eaf3a7c7fe1 (diff) | |
| parent | a0c79f5d1f5941c9cb855f90180b071b23f0ef90 (diff) | |
| download | rabbitmq-server-git-2e92b56d76be85d12813a52b891bb7555d6e9672.tar.gz | |
Merged bug25553 into default
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_exchange_type_headers.erl | 12 | ||||
| -rw-r--r-- | src/rabbit_misc.erl | 4 | ||||
| -rw-r--r-- | src/supervisor2.erl | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/rabbit_exchange_type_headers.erl b/src/rabbit_exchange_type_headers.erl index baec9c299a..c841560e2c 100644 --- a/src/rabbit_exchange_type_headers.erl +++ b/src/rabbit_exchange_type_headers.erl @@ -103,17 +103,15 @@ headers_match([{PK, _PT, _PV} | PRest], Data = [{DK, _DT, _DV} | _], headers_match([{PK, PT, PV} | PRest], [{DK, DT, DV} | DRest], AllMatch, AnyMatch, MatchKind) when PK == DK -> {AllMatch1, AnyMatch1} = - if + case rabbit_misc:type_class(PT) == rabbit_misc:type_class(DT) of %% It's not properly specified, but a "no value" in a %% pattern field is supposed to mean simple presence of %% 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. - PT =/= DT -> {false, AnyMatch}; - PV == DV -> {AllMatch, true}; - true -> {false, AnyMatch} + _ when PT == void -> {AllMatch, true}; + false -> {false, AnyMatch}; + _ when PV == DV -> {AllMatch, true}; + _ -> {false, AnyMatch} end, headers_match(PRest, DRest, AllMatch1, AnyMatch1, MatchKind). diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index bca9d5ce75..8cc8326580 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -21,7 +21,8 @@ -export([method_record_type/1, polite_pause/0, polite_pause/1]). -export([die/1, frame_error/2, amqp_error/4, quit/1, protocol_error/3, protocol_error/4, protocol_error/1]). --export([not_found/1, absent/1, assert_args_equivalence/4]). +-export([not_found/1, absent/1]). +-export([type_class/1, assert_args_equivalence/4]). -export([dirty_read/1]). -export([table_lookup/2, set_table_value/4]). -export([r/3, r/2, r_arg/4, rs/1]). @@ -120,6 +121,7 @@ (rabbit_types:amqp_error()) -> channel_or_connection_exit()). -spec(not_found/1 :: (rabbit_types:r(atom())) -> rabbit_types:channel_exit()). -spec(absent/1 :: (rabbit_types:amqqueue()) -> rabbit_types:channel_exit()). +-spec(type_class/1 :: (rabbit_framing:amqp_field_type()) -> atom()). -spec(assert_args_equivalence/4 :: (rabbit_framing:amqp_table(), rabbit_framing:amqp_table(), rabbit_types:r(any()), [binary()]) -> diff --git a/src/supervisor2.erl b/src/supervisor2.erl index 5a6dc88745..db4c388a90 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -85,7 +85,7 @@ %%-------------------------------------------------------------------------- -ifdef(use_specs). --export_type([child_spec/0, startchild_ret/0, strategy/0]). +-export_type([child_spec/0, startchild_ret/0, strategy/0, sup_name/0]). -endif. %%-------------------------------------------------------------------------- |
