diff options
| author | Jean-Sebastien Pedron <jean-sebastien@rabbitmq.com> | 2014-11-26 18:21:44 +0100 |
|---|---|---|
| committer | Jean-Sebastien Pedron <jean-sebastien@rabbitmq.com> | 2014-11-26 18:21:44 +0100 |
| commit | dfe1b688621647aa2447699b9106d102217b1b31 (patch) | |
| tree | af2723a1edc4e8f27879133970493c510679c4dc /src | |
| parent | 1963252daa89ff6736b2d4f776bcf6e9345db0b3 (diff) | |
| download | rabbitmq-server-git-dfe1b688621647aa2447699b9106d102217b1b31.tar.gz | |
Only check ERTS version to determine if we accept an external eldap
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_plugins.erl | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl index fe614b6a1f..fd6acb5cb2 100644 --- a/src/rabbit_plugins.erl +++ b/src/rabbit_plugins.erl @@ -148,37 +148,9 @@ keep_plugin(#plugin{name = App} = Plugin) -> end. plugin_provided_by_otp(#plugin{name = eldap, version = PluginVsn}) -> - %% eldap was added to Erlang/OTP R15B01. We prefer this version - %% to the plugin. Before, eldap always advertised version "1". In - %% R15B01, it got proper versionning starting from "1.0". If eldap's - %% version is "1", we keep using the plugin, otherwise we take the - %% OTP application. As an extra check, we look at ERTS version to be - %% sure we're on R15B01. - case application:get_key(eldap, vsn) of - {ok, PluginVsn} -> - %% The plugin itself; the plugin was previously added to the - %% code path. - false; - {ok, "1"} -> - %% The version available on GitHub, not part of OTP. - false; - {ok, Vsn} -> - try rabbit_misc:version_compare(Vsn, "1.0", gte) of - true -> - %% Probably part of OTP. Let's check ERTS version to - %% be sure. - rabbit_misc:version_compare( - erlang:system_info(version), "5.9.1", gte); - false -> - %% Probably not part of OTP. Use the plugin to be safe. - false - catch - _:_ -> - %% Couldn't parse the version. It's not the OTP - %% application. - false - end - end; + %% eldap was added to Erlang/OTP R15B01 (ERTS 5.9.1). In this case, + %% we prefer this version to the plugin. + rabbit_misc:version_compare(erlang:system_info(version), "5.9.1", gte); plugin_provided_by_otp(_) -> false. |
