24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-02 21:17:12 +02:00
Commit Graph

87 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
6b079c0ab3 Preserve modules order
When modules for some virtual host are about to be started,
they are topologically sorted to preserve dependencies order.
We now keep this order for stop/reload functions to work properly.
2018-03-13 18:18:53 +03:00
Evgeniy Khramtsov
c3eeb8624b Strip duplicates from module's options 2018-03-07 17:46:16 +03:00
Evgeniy Khramtsov
06c480106f Don't emit validator's warning if the module is not found 2018-02-19 22:07:09 +03:00
Evgeniy Khramtsov
c990abf222 Improve log message when module startup has failed 2018-02-02 13:16:14 +03:00
Paweł Chmielowski
fc3c605945 Use correct default when getting list of modules from config 2018-01-30 19:44:27 +01:00
Evgeniy Khramtsov
ba2b650464 Introduce new gen_mod callback: mod_options/1
The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
2018-01-23 10:54:52 +03:00
Evgeniy Khramtsov
cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Evgeniy Khramtsov
1f21f64d5f Improve some error log messages 2017-11-15 11:54:38 +03:00
Evgeniy Khramtsov
3fec782494 Introduce 'hosts' option
The option can be used as a replacement of 'host' option
when several (sub)domains are needed to be registered for the module.
Note that you cannot combine both 'host' and 'hosts' in the config
because 'host' option is of a higher priority. Example:

mod_pubsub:
   ...
   hosts:
     - "pubsub1.@HOST@"
     - "pubsub2.@HOST@"

Fixes #1883
2017-08-08 17:46:26 +03:00
Evgeniy Khramtsov
8f595b58a7 Increase gen_mod's supervisor shutdown time 2017-05-17 17:33:07 +03:00
Evgeniy Khramtsov
01a2c9fe12 Add type specs for Module:opt_type/1 2017-05-08 12:59:28 +03:00
Evgeniy Khramtsov
b174e2c9c6 Improve validation of second-level options 2017-05-05 11:11:17 +03:00
Evgeniy Khramtsov
fb17c1b99f Make it possible to validate second-level options 2017-05-04 17:34:32 +03:00
Evgeniy Khramtsov
a2a4a4970e Validate module options on start_module/2 2017-05-04 09:09:10 +03:00
Evgeniy Khramtsov
54cc49bc70 Validate new options before module reloading 2017-05-01 14:01:12 +03:00
Evgeniy Khramtsov
fe662c1a0a Don't forget to delete digraph 2017-05-01 10:14:00 +03:00
Evgeniy Khramtsov
fddd6110e0 Don't validate an option in gen_mod:get*opt() functions
The changes are very similar to those from previous commit:
* Now there is no need to pass validating function in
  gen_mod:get_opt() and gen_mod:get_module_opt() functions,
  because the modules' configuration keeps already validated values.
* New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are
  introduced.
* Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated.
  If the functions are still called, the "function" argument is
  simply ignored.
* Validating callback Mod:listen_opt_type/1 is introduced to validate
  listening options at startup.
2017-04-30 19:01:47 +03:00
Evgeniy Khramtsov
b82b93f8f0 Don't validate an option in ejabberd_config:get_option() functions
The commit introduces the following changes:
* Now there is no need to pass validating function in
  ejabberd_config:get_option() functions, because the configuration
  keeps already validated values.
* New function ejabberd_config:get_option/1 is introduced
* Function ejabberd_config:get_option/3 is deprecated. If the function
  is still called, the second argument (validating function) is simply
  ignored.
* The second argument for ejabberd_config:get_option/2 is now
  a default value, not a validating function.
2017-04-29 11:39:40 +03:00
Evgeniy Khramtsov
6fa55e7c38 Set 'read_concurrency' for some ETS tables 2017-04-05 15:10:18 +03:00
Evgeniy Khramtsov
0124d292b5 Add gen_mod:is_loaded_elsewhere/2 2017-02-24 16:31:39 +03:00
Evgeniy Khramtsov
67d6ca9f10 Improve startup procedure 2017-02-24 12:05:47 +03:00
Evgeniy Khramtsov
6cdead166b Start/stop auth modules when host is added/deleted 2017-02-23 16:19:22 +03:00
Evgeniy Khramtsov
7d68112265 Start/stop virtual hosts when reloading configuration file 2017-02-23 10:12:19 +03:00
Evgeniy Khramtsov
3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Evgeniy Khramtsov
940ca9311d Fix some dialyzer warnings 2017-02-18 09:36:27 +03:00
Evgeniy Khramtsov
218eeae797 Fix some dialyzer warnings 2017-02-16 14:18:36 +03:00
Evgeniy Khramtsov
28f66ddd7c Attach modules to gen_mod's supervisor 2017-02-14 12:39:26 +03:00
Evgeniy Khramtsov
e1ba499bd6 Check result of gen_mod:start/2 callback (#1534) 2017-02-13 11:11:41 +03:00
Evgeniy Khramtsov
d5d906184f Merge branch 'new_stream'
Conflicts:
	src/cyrsasl.erl
	src/ejabberd_c2s.erl
	src/ejabberd_cluster.erl
	src/ejabberd_frontend_socket.erl
	src/ejabberd_node_groups.erl
	src/ejabberd_router.erl
	src/mod_bosh.erl
	src/mod_ip_blacklist.erl
	src/mod_muc_mnesia.erl
	src/mod_offline.erl
	src/mod_proxy65_sm.erl
2017-01-20 19:35:46 +03:00
Evgeniy Khramtsov
0baaad30b1 Implement database backend interface for MUC, BOSH and auth_anonyous 2017-01-13 12:03:39 +03:00
Evgeniy Khramtsov
02f96d0f41 Implement database backend interface for ejabberd_router 2017-01-11 16:25:43 +03:00
Badlop
5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Paweł Chmielowski
62db030942 Merge mod_opt_type from db sub-modules to main module mod_opt_type 2016-11-04 12:58:08 +01:00
Evgeniy Khramtsov
c718cbbd9f Warn on cyclic modules dependencies 2016-07-07 11:34:17 +03:00
Evgeniy Khramtsov
4220a2b98c Make modules loading in a dependent order (#1191) 2016-07-06 14:58:48 +03:00
Paweł Chmielowski
4b9613e8fe Allow {mod_}opt_type to transform values passed to it, and for better error reporting 2016-06-21 12:25:29 +02:00
Holger Weiss
d54f211514 Add mod_opt_type/1 callback to gen_mod behaviour 2016-05-01 22:09:40 +02:00
Holger Weiss
b46ed7044a Cope with modules that don't export mod_opt_type/1 2016-05-01 22:06:15 +02:00
Evgeniy Khramtsov
9c369b7a8c Improve detection of databases supported by modules (#1092) 2016-04-27 17:10:50 +03:00
Evgeniy Khramtsov
1aae8a9fda Rename odbc to sql everywhere 2016-04-20 13:25:42 +03:00
Evgeniy Khramtsov
5eef8a8bcf Make it possible to get DB backend of a module 2016-04-13 09:56:10 +03:00
Badlop
78a44d8099 Move start and stop_modules/0 from ejabberd_app to gen_mod (#1039) 2016-03-29 15:26:34 +02:00
Badlop
f448ff608a Update copyright to 2016 (#901) 2016-01-13 12:29:14 +01:00
Christophe Romain
dc0934bff7 Update FSF address 2015-08-05 09:52:54 +02:00
Evgeniy Khramtsov
9a9633dbc5 Do not ignore unknown options so far 2015-06-03 16:21:22 +03:00
Evgeniy Khramtsov
fb6267f38e Add config validation at startup 2015-06-01 15:38:27 +03:00
Evgeniy Khramtsov
a9f7d9481f Do not try to fetch module options via eldap_utils 2015-06-01 15:22:31 +03:00
Evgeniy Khramtsov
60fe008268 Remove duplicated code 2015-04-29 14:51:45 +03:00
Evgeniy Khramtsov
4af15df546 Add new 'default_db' option 2015-03-30 12:15:29 +03:00
Badlop
5a35405cd5 Update copyright dates to 2015 (EJAB-1733) 2015-01-08 17:34:43 +01:00