Commit Graph

120 Commits

Author SHA1 Message Date
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
Alexey Shchepin a4b02c38db Updated riak support 2014-07-10 13:15:15 +04:00
Evgeniy Khramtsov fc692ea512 Add start_module/2 2014-07-08 20:58:03 +04:00
badlop 285c4c17cf Merge pull request #146 from jamielinux/master
Update FSF address
2014-04-11 13:35:46 +02:00
Badlop 633d47f784 Update copyright dates to 2014 (EJAB-1679) 2014-03-13 12:30:57 +01:00
Jamie Nguyen 8538997d61 Update FSF address 2014-02-22 10:27:40 +00:00
Evgeniy Khramtsov 91a74e3e27 Change configuration file format to YAML 2013-08-21 22:17:59 +10:00
Evgeniy Khramtsov 4d8f770624 Switch to rebar build tool
Use dynamic Rebar configuration
Make iconv dependency optional
Disable transient_supervisors compile option
Add hipe compilation support
Only compile ibrowse and lhttpc when needed
Make it possible to generate an OTP application release
Add --enable-debug compile option
Add --enable-all compiler option
Add --enable-tools configure option
Add --with-erlang configure option.
Add --enable-erlang-version-check configure option.
Add lager support
Improve the test suite
2013-06-13 11:11:02 +02:00
Badlop 9deb294328 Accumulated patch to binarize and indent code 2013-03-14 10:33:02 +01:00
Alexey Shchepin 0ae400533c Update copyright dates 2013-01-24 16:25:13 +02:00
Evgeniy Khramtsov 437f68a9f3 Merge SQL and Mnesia code into one module (EJAB-1560) 2012-04-27 19:52:05 +10:00
Alexey Shchepin b1e2538488 Update copyright dates 2012-02-23 17:52:34 +02:00
Badlop 48308042b6 Use the regexp frontend module (EJAB-921) 2011-12-08 12:40:04 +01:00
Badlop d4d28e038b Cut the string when calling halt/1 2011-05-30 17:11:32 +02:00
Badlop f7d532f2f7 When module start fails during server start, stop erlang (EJAB-1446) 2011-05-16 22:33:59 +02:00
Christophe Romain fd52f2cb7d update copyright up to 2011 2011-02-14 13:50:55 +01:00
Andreas Köhler c4bc0e7252 Re-raise exceptions caught in gen_mod:start_module/3 (EJAB-1335)
Modules configured by the administrator normally should not be treated
as optional, so a exception (error, exit, throw) to start them should not
be caught and logged only.

This patch re-raises a caught exception instead of ignoring the
exception and inserting the module's opts on success. That way
gen_mod:get_module_opt/4 should work while calling Module:start/2.
2010-11-07 00:49:52 +01:00
Badlop 7b76fdcde7 Update year of ProcessOne copyright from 2009 to 2010 (EJAB-1159)
SVN Revision: 2891
2010-01-12 16:11:32 +00:00
Badlop f09509502e * doc/guide.tex: Update copyright date 2008 to 2009 (EJAB-842)
* doc/guide.html: Likewise
* src/*/*.erl: Likewise
* src/*/*.erl: Remove unneeded blankspaces in license text

SVN Revision: 1804
2009-01-12 14:44:42 +00:00
Badlop 6a785fa536 * src/gen_mod.erl: First store module options in ETS and Mnesia,
then start the module. In case of failure, remove options from
ETS. Until now the module was started before the options were
stored in database, and some modules started incorrectly because
they couldn't access the options from database; for instance
mod_muc_room required this for reading max_users option.

* src/mod_muc/mod_muc_room.erl: Include the value of max_users
service option and the current max_users room option in the list
of allowed room limit values.

SVN Revision: 1685
2008-11-26 15:10:38 +00:00
Badlop cdcf2d380b * src/ejabberd_lstener.erl: Fix listeners
* src/ejabberd_sup.erl: Likewise
* src/gen_mod.erl: Likewise

SVN Revision: 1665
2008-10-24 17:26:11 +00:00
Badlop 2660be962a * src/gen_mod.erl: Export stop_module_keep_config/2 (EJAB-706)
SVN Revision: 1525
2008-08-16 12:03:21 +00:00
Badlop c3bda4aaee * doc/guide.tex: Update Process-one name to ProcessOne (EJAB-708)
* doc/guide.html: Likewise
* doc/api/overview.edoc: Likewise
* src/*/*.erl: Likewise
* src/*/*.hrl: Likewise
* src/*/*.c: Likewise
* src/odbc/*.sql: Likewise

SVN Revision: 1499
2008-07-31 11:18:49 +00:00
Badlop 2660bc514f * src/gen_mod.erl: When ejabberd is kindly stopped, don't forget
modules configuration (EJAB-706)
* src/ejabberd_app.erl: Likewise

SVN Revision: 1497
2008-07-30 18:11:14 +00:00
Badlop 2d2fcc8210 * doc/guide.tex: Updated copyright dates to 2008
* src/*: Likewise

SVN Revision: 1153
2008-01-15 17:02:57 +00:00
Mickaël Rémond 56fe3579bb * Applied copyright update patch 1.
SVN Revision: 1110
2007-12-24 11:41:41 +00:00
Badlop 69b425aeb7 * src/gen_mod.erl: Update in database the configuration changes in
modules (EJAB-330)

SVN Revision: 996
2007-11-27 22:30:51 +00:00
Alexey Shchepin e809c6c322 * src/gen_mod.erl: Added get_module_opt_host/3 (thanks to Badlop)
SVN Revision: 927
2007-09-11 11:20:36 +00:00
Alexey Shchepin 5dfa6edda3 * src/gen_mod.erl: Substitute @HOST@ with hostname in the 'host'
option (thanks to Badlop)
* src/mod_vcard.erl: Likewise
* src/mod_vcard_ldap.erl: Likewise
* src/mod_vcard_odbc.erl: Likewise
* src/mod_muc/mod_muc.erl: Likewise
* src/mod_irc/mod_irc.erl: Likewise
* src/mod_echo.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/mod_proxy65/mod_proxy65_service.erl: Likewise

SVN Revision: 888
2007-08-25 17:24:00 +00:00
Mickaël Rémond c72cb51c73 * src/mod_announce.erl: Added support to all the announce features described in documentation. Access to all announce features through command line, adhoc commands and disco (Thanks to Badlop) (EJAB-18).
* src/gen_mod.erl: Likewise.
* doc/guide.tex: Likewise.

SVN Revision: 858
2007-08-03 08:53:05 +00:00
Mickaël Rémond 8d9e093788 * src/gen_mod.erl: Throw error more cleanly.
SVN Revision: 831
2007-07-26 09:56:38 +00:00
Alexey Shchepin 568909d5bb * src/aclocal.m4: Updated for zlib support
* src/configure.ac: Likewise

* src/mod_muc/mod_muc_room.erl: Weakened presence filtering, added
warning in non-anonymous rooms, room destroying updated to latest
JEP-0045, added a number of occupants and room name in room's
disco#info reply, miscellaneous internal changes (thanks to Sergei
Golovan)

* src/mod_muc/mod_muc.erl: Better support for nick unregistration
(thanks to Sergei Golovan)

* src/ejabberd_zlib/ejabberd_zlib.erl: Zlib support (thanks to
Sergei Golovan)
* src/ejabberd_zlib/ejabberd_zlib_drv.c: Likewise
* src/ejabberd_zlib/Makefile.in: Likewise
* src/ejabberd_c2s.erl: Stream compression support (JEP-0138)
* src/ejabberd_receiver.erl: Likewise

* src/mod_disco.erl: Don't split node name before calling hooks
(thanks to Sergei Golovan)

* src/mod_configure.erl: Support for configuration using ad-hoc
commands (thanks to Sergei Golovan)

* src/mod_announce.erl: Support for sending announce messages
using ad-hoc commands (thanks to Sergei Golovan)

* src/mod_adhoc.erl: Ad-hoc support (JEP-0050) (thanks to Magnus
Henoch)
* src/adhoc.erl: Likewise
* src/adhoc.hrl: Likewise

* src/jlib.hrl: Updated (thanks to Sergei Golovan)

* src/gen_mod.erl: Added function is_loaded/2 (thanks to Sergei
Golovan)

* src/ejabberd_service.erl: Changed error message on handshake
error (thanks to Sergei Golovan)

* src/ejabberd.cfg.example: Updated (thanks to Sergei Golovan)

SVN Revision: 486
2006-01-19 02:17:31 +00:00
Alexey Shchepin 4098c3ecba * (all): Enhanced virtual hosting support
SVN Revision: 370
2005-06-20 03:18:13 +00:00
Alexey Shchepin 820c78484a * src/web/ejabberd_web_admin.erl: Updated CSS, added modules
management (thanks to Sergei Golovan)

* src/gen_mod.erl: Added function loaded_modules_with_opts/0, new
API for module stopping (thanks to Sergei Golovan)
* src/mod_muc/mod_muc.erl: Moved a process name to a macros,
updated module stopping (thanks to Sergei Golovan)
* src/mod_irc/mod_irc.erl: Likewise
* src/mod_pubsub/mod_pubsub.erl: Likewise
* src/mod_announce.erl: Updated module stopping (thanks to Sergei
Golovan)
* src/mod_echo.erl: Likewise
* src/mod_offline.erl: Likewise

SVN Revision: 354
2005-05-23 00:30:29 +00:00
tmallard 374446f847 Merged the Process One contributions ( Virtual Hosting )
SVN Revision: 307
2005-04-17 18:08:34 +00:00
Alexey Shchepin a846fe815c * src/mod_last.erl: Supprot for storing status from latest
unavailable presence (thanks to Sergei Golovan)
* src/ejabberd_sm.erl: Likewise
* src/ejabberd_c2s.erl: Likewise

* src/mod_vcard.erl: Minor update (thanks to Sergei Golovan)

* src/mod_register.erl: Added "access" option (thanks to Sergei
Golovan)
* src/mod_irc/mod_irc.erl: Likewise
* src/ejabberd.cfg.example: Updated
* src/win32/ejabberd.cfg: Likewise

* src/mod_privacy.erl: Fixed module stopping (thanks to Sergei
Golovan)
* src/mod_private.erl: Likewise

* src/gen_mod.erl: Added function get_module_opt/3 (thanks to
Sergei Golovan)

* src/ejabberd_local.erl: Minor fix (thanks to Sergei Golovan)

* doc/guide.tex: Updated (thanks to Sergei Golovan)

SVN Revision: 244
2004-07-11 20:51:54 +00:00
Alexey Shchepin 275b31b0cf *** empty log message ***
SVN Revision: 52
2003-01-28 19:45:13 +00:00
Alexey Shchepin 2aa3c1c720 *** empty log message ***
SVN Revision: 49
2003-01-24 20:18:33 +00:00