Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 7577a31

Browse files
Support maps as well as proplists when fetching global runtime params
Part of rabbitmq/rabbitmq-management#528.
1 parent 02b1df1 commit 7577a31

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/rabbit_mqtt_processor.erl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ get_vhost_username(UserBin) ->
594594
get_vhost_from_user_mapping(_User, not_found) ->
595595
undefined;
596596
get_vhost_from_user_mapping(User, Mapping) ->
597-
case rabbit_misc:pget(User, Mapping) of
597+
M = rabbit_data_coercion:to_proplist(Mapping),
598+
case rabbit_misc:pget(User, M) of
598599
undefined ->
599600
undefined;
600601
VHost ->
@@ -604,7 +605,8 @@ get_vhost_from_user_mapping(User, Mapping) ->
604605
get_vhost_from_port_mapping(_Port, not_found) ->
605606
undefined;
606607
get_vhost_from_port_mapping(Port, Mapping) ->
607-
Res = case rabbit_misc:pget(rabbit_data_coercion:to_binary(Port), Mapping) of
608+
M = rabbit_data_coercion:to_proplist(Mapping),
609+
Res = case rabbit_misc:pget(rabbit_data_coercion:to_binary(Port), M) of
608610
undefined ->
609611
undefined;
610612
VHost ->

0 commit comments

Comments
 (0)