]> granicus.if.org Git - ejabberd/commitdiff
Get rid of detection of modules' db_type detection
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sun, 21 May 2017 08:33:16 +0000 (11:33 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Sun, 21 May 2017 08:33:16 +0000 (11:33 +0300)
The detection sometimes leads to errorneous warnings.
We need to improve it later. For now I just remove the
detection as it doesn't fully work anyway.

src/ejabberd_redis_sup.erl
src/ejabberd_riak_sup.erl

index 39b7ef7987fdfcd4f7d4081f23b893088c00137a..9b3cc11bb40892c75f538001f2287b7a0eeda6de 100644 (file)
@@ -108,17 +108,11 @@ is_redis_configured(Host) ->
     PoolSize = ejabberd_config:has_option({redis_pool_size, Host}),
     ConnTimeoutConfigured = ejabberd_config:has_option(
                              {redis_connect_timeout, Host}),
-    Modules = ejabberd_config:get_option({modules, Host}, []),
     SMConfigured = ejabberd_config:get_option({sm_db_type, Host}) == redis,
     RouterConfigured = ejabberd_config:get_option({router_db_type, Host}) == redis,
-    ModuleWithRedisDBConfigured =
-       lists:any(
-         fun({Module, Opts}) ->
-                 gen_mod:db_type(Host, Opts, Module) == redis
-         end, Modules),
     ServerConfigured or PortConfigured or DBConfigured or PassConfigured or
        PoolSize or ConnTimeoutConfigured or
-       SMConfigured or RouterConfigured or ModuleWithRedisDBConfigured.
+       SMConfigured or RouterConfigured.
 
 get_specs() ->
     lists:map(
index 30be65c4fd7ad5864604cedf83c6489512ebff7c..67b50ea6aae95f5cc90b189272c6b26e326c900a 100644 (file)
@@ -89,16 +89,11 @@ is_riak_configured(Host) ->
                       ejabberd_auth:auth_modules(Host)),
     SMConfigured = ejabberd_config:get_option({sm_db_type, Host}) == riak,
     RouterConfigured = ejabberd_config:get_option({router_db_type, Host}) == riak,
-    Modules = ejabberd_config:get_option({modules, Host}, []),
-    ModuleWithRiakDBConfigured = lists:any(
-                                  fun({Module, Opts}) ->
-                                          gen_mod:db_type(Host, Opts, Module) == riak
-                                  end, Modules),
     ServerConfigured or PortConfigured or StartIntervalConfigured
        or PoolConfigured or CacertConfigured
        or UserConfigured or PassConfigured
        or SMConfigured or RouterConfigured
-       or AuthConfigured or ModuleWithRiakDBConfigured.
+       or AuthConfigured.
 
 start_link() ->
     supervisor:start_link({local, ?MODULE}, ?MODULE, []).