24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-14 22:00:16 +02:00
Commit Graph

4322 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
3241c2506b Introduce 'sql_connect_timeout' option (#1698) 2017-05-05 16:25:10 +03:00
Evgeniy Khramtsov
48d6ae1def Introduce 'sql_query_timeout' option
Fixes #1698
2017-05-05 13:20:28 +03:00
Evgeniy Khramtsov
f2dc8c0442 Emit deprecation warning for SM related listening options 2017-05-05 12:31:17 +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
Paweł Chmielowski
c64e77a08c Catch exceptions from acl:add_list in web admin 2017-05-04 12:01:22 +02:00
Evgeniy Khramtsov
cf53d834e9 Introduce 'iqdisc' global option 2017-05-04 12:24:47 +03:00
Evgeniy Khramtsov
a2a4a4970e Validate module options on start_module/2 2017-05-04 09:09:10 +03:00
Badlop
31fa36003f Parse ldap_uids in mod_vcard_ldap like in eldap_utils (#319) 2017-05-03 23:32:56 +02: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
2b63d07329 Merge branch 'new-option-validation' 2017-04-29 11:48:57 +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
7129aebe76 Don't re-define validation functions in multiple places 2017-04-28 13:23:32 +03:00
Paweł Chmielowski
2bcf822637 Fix elixir tests 2017-04-28 10:08:09 +02:00
Evgeniy Khramtsov
0b93cb7ece Store options using p1_options module 2017-04-27 19:44:58 +03:00
Badlop
d18d99e8ec Bug requesting non-existent data with private_get command (#1690) 2017-04-26 23:14:30 +02:00
Holger Weiss
9b8364b6c8 Merge remote-tracking branch 'processone/pr/1699'
* processone/pr/1699:
  Add support for HTTP File Upload, version 0.3.0
2017-04-26 21:18:16 +02:00
Badlop
c0eb85ce53 Allow a room admin also to subscribe another JID 2017-04-26 01:30:12 +02:00
Holger Weiss
56a4bf8f3c mod_stream_mgmt: Fix typo in variable name 2017-04-25 22:37:27 +02:00
Holger Weiss
9cc332d6b3 mod_stream_mgmt: Fix 'if_offline' detection 2017-04-25 22:32:03 +02:00
Evgeniy Khramtsov
120682ec8b Include original 'id' and 'type' attributes in offline event 2017-04-25 17:59:26 +03:00
Evgeniy Khramtsov
069bf6dec6 Make sure only jabberevent tag is present in offline event 2017-04-25 17:21:24 +03:00
Holger Weiss
d0f3696596 randoms: Keep compatibility with Erlang/OTP 17 2017-04-24 23:51:01 +02:00
Evgeniy Khramtsov
c923bb5c10 Avoid changing configuration on listener deletion 2017-04-23 16:42:54 +03:00
Evgeniy Khramtsov
9a93acc62a Improve Mnesia tables creation and transformation 2017-04-23 16:37:58 +03:00
Evgeniy Khramtsov
8770fc98e1 Use round-robin algorithm when selecting worker from DB pool 2017-04-23 11:54:56 +03:00
Evgeniy Khramtsov
18433e289f Add clear_cache admin command 2017-04-22 11:33:39 +03:00
Holger Weiss
168712ebbd Add support for HTTP File Upload, version 0.3.0
Support the current XEP-0363 version in addition to the previous
revisions.
2017-04-21 18:36:53 +02:00
Evgeniy Khramtsov
02790b105e Speedup Mnesia tables initialization 2017-04-21 12:27:15 +03:00
Evgeniy Khramtsov
d88c08e074 Use new cache API in mod_shared_roster_ldap 2017-04-21 10:43:14 +03:00
Evgeniy Khramtsov
9937cb48fd Use new cache API in ejabberd_oauth 2017-04-21 09:02:10 +03:00
Evgeniy Khramtsov
5444475b1d Correct option validation 2017-04-20 18:55:16 +03:00
Evgeniy Khramtsov
264a40f217 Use new cache API in mod_mam 2017-04-20 18:52:16 +03:00
Evgeniy Khramtsov
a26f90a346 Use new cache API in mod_caps 2017-04-20 18:18:26 +03:00
Badlop
ca9d04ba6b Fix private_get command sending a proper xmlel (#1683) 2017-04-20 16:50:08 +02:00
Badlop
4e86a71ab2 When getting user rooms, filter by the serverhost as expected (#1683) 2017-04-20 16:49:32 +02:00
Holger Weiss
3682888655 mod_stream_mgmt: Preserve stanza count on timeout
If a pending stream management session times out, call
ejabberd_c2s:process_terminated/2 *before* storing the incoming stanza
count.  Without this change, the session table entry that holds the
stanza count was purged while closing the session.
2017-04-19 23:04:20 +02:00
Holger Weiss
3adf720bc1 Use #jid{} type for #muc_unsubscribe.jid 2017-04-19 22:18:23 +02:00
Badlop
d7a999eaf5 Don't use jid:from_string as it's deprecated, see jid.erl line 43 2017-04-19 21:47:59 +02:00
Evgeniy Khramtsov
64333f69ea Don't try to load already loaded applications 2017-04-19 11:40:58 +03:00
Holger Weiss
b8a7720986 ejabberd_c2s: Don't close session on stream resume
Don't let ejabberd_c2s close the session and unset presence if a
'c2s_terminated' callback stops hook execution, as is done in
mod_stream_mgmt:c2s_terminated/2 on resumption.

Fixes #1680.
2017-04-19 01:20:28 +02:00
Evgeniy Khramtsov
7c9415356d Function fix_from_to/2 should not crash when 'from' is undefined
Fixes #1678
2017-04-18 01:38:35 +03:00
getong
ab751d290a lager_crash_log in some cases not run, catch it 2017-04-17 12:07:23 +08:00
Evgeniy Khramtsov
f496d22074 Improve logging message 2017-04-16 23:56:12 +03:00
Evgeniy Khramtsov
86b680a3ad Move compile_exprs() to misc module 2017-04-16 20:05:46 +03:00
Evgeniy Khramtsov
78dba217bf Speedup configuration options lookup
We now avoid excessive ETS lookups; instead, we use dynamically
compiled module 'ejabberd_options' keeping the configuration options
2017-04-16 15:29:10 +03:00
Evgeniy Khramtsov
878c762cdf Log human readable description when configuration file is not found 2017-04-16 01:22:55 +03:00
Evgeniy Khramtsov
920f2678ac Report configuration file location on startup 2017-04-16 01:02:46 +03:00
Evgeniy Khramtsov
b6182e6fe8 Speedup loading of translation files
A dump of 'translations' ETS table is now stored on disc.
The table is only re-created when new/deleted/modified translation
files are detected; otherwise, the ETS table is restored from
the dump file on startup.
2017-04-16 00:29:55 +03:00
Evgeniy Khramtsov
41fe062a8d Lower log level for some messages 2017-04-15 15:47:00 +03:00
Evgeniy Khramtsov
4c5f97bb9a Add Riak as mod_proxy65 RAM backend 2017-04-15 15:38:48 +03:00
Evgeniy Khramtsov
f9c24ab16d Add Riak as mod_carboncopy RAM backend 2017-04-15 14:41:14 +03:00
Evgeniy Khramtsov
72b536b52d Add Riak as BOSH RAM backend 2017-04-15 13:52:36 +03:00
Evgeniy Khramtsov
598c79ff86 Fix cleaning of Riak route table 2017-04-15 13:36:29 +03:00
Evgeniy Khramtsov
da66eb5714 Add Riak as router RAM backend 2017-04-15 13:07:56 +03:00
Evgeniy Khramtsov
c290b4284f Fix closing of outbound S2S connections 2017-04-15 11:15:50 +03:00
Evgeniy Khramtsov
fcb978248f Add Riak as session manager RAM backend 2017-04-15 10:02:32 +03:00
Evgeniy Khramtsov
5774edfe79 Improve ejabberd_c2s:close() 2017-04-15 08:30:41 +03:00
Evgeniy Khramtsov
5c23187d2c Make sure stream trailer is sent in the very end 2017-04-14 20:56:01 +03:00
Evgeniy Khramtsov
0a7eb33772 Better process session close 2017-04-14 20:41:25 +03:00
Evgeniy Khramtsov
9de075029b Fix a typo 2017-04-14 20:40:39 +03:00
Evgeniy Khramtsov
d110cbb6e2 Fix ejabberd_router:is_my_route/1 2017-04-14 20:34:00 +03:00
Evgeniy Khramtsov
e40baf0bda Use cache in front of Redis/SQL RAM backends 2017-04-14 13:57:52 +03:00
Badlop
177d5fec86 Allow a room admin to unsubscribe another JID 2017-04-13 22:37:39 +02:00
Holger Weiss
87ae2d7996 mod_muc_room: Replace deprecated function call
Use jid:decode/1 instead of jlib:string_to_jid/1.
2017-04-11 13:38:33 +02:00
Christophe Romain
b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Badlop
1e82db5655 New muc_register_nick command (thanks to Peter Marheine)(#1407) 2017-04-10 12:23:14 +02:00
Christophe Romain
f2ca4cb3cd Merge pull request #1666 from weiss/fix-csi
Let CSI keep latest stanzas of each given full JID
2017-04-07 15:10:39 +02:00
Christophe Romain
cf784772c9 Merge pull request #1664 from weiss/fix-routing
Fix routing of groupchat and headline messages
2017-04-07 15:10:26 +02:00
Christophe Romain
0567d528c6 Let ext_mod be aware of p1_utils includes 2017-04-07 12:51:43 +02:00
Christophe Romain
36e3f4bc2a Generate ejabberd lib dir when not available in code server (#1665)
This is the case if running ejabberd from development directory
when code:lib_dir(ejabberd) returns {error, nad_name}.
2017-04-07 12:09:43 +02:00
Christophe Romain
1510ee0b3c Merge pull request #1660 from michal800106/master
Fix order of starting supervisors.
2017-04-07 10:04:38 +02:00
Evgeniy Khramtsov
3729acc5b0 Improve logging of Redis errors 2017-04-07 09:10:33 +03:00
Holger Weiss
9fa5f37f74 mod_client_state: Remove some empty lines 2017-04-06 23:00:53 +02:00
Holger Weiss
0ddd2e0ebf mod_client_state: Queue stanzas of each full JID
Keep the latest stanzas of each given full JID, rather than dropping
them when stanzas from a different resource are received.  This change
makes sure the recipient receives the latest status of all clients of
each contact.  It also ensures the recipient will see the current list
of occupants of joined MUC rooms.
2017-04-06 22:19:00 +02:00
Holger Weiss
7827faae4b mod_client_state: Don't keep track of queue size
Use maps:size/1 rather than keeping track of the size ourselves.
2017-04-06 21:01:26 +02:00
Evgeniy Khramtsov
245fe04289 Improve type specs and return values 2017-04-06 20:56:46 +03:00
Evgeniy Khramtsov
6876a37e61 Add Redis pool support
Fixes #1624
2017-04-06 17:56:37 +03:00
michal
81fe380de2 Fix order of starting supervisors.
ExtMod should be loaded before GenModSupervisor because ext_mod adds proper paths to ebin from modules (ejabberd-contrib).
Without this change you have to add -pa parameter with path to module's ebin.
2017-04-06 08:50:23 +02:00
Holger Weiss
179e8934cf ejabberd_sm: Fix routing of headline messages
As per RFC 6121, silently drop headline messages sent to the bare JID of
an offline user or to the full JID of an unavailable resource.
2017-04-05 21:03:13 +02:00
Holger Weiss
8bfb6fdd4e ejabberd_sm: Fix routing of groupchat messages
As per RFC 6121, don't (re)route groupchat messages sent to a bare JID
or to an unavailable resource.
2017-04-05 20:41:10 +02:00
Holger Weiss
89f81c89da ejabberd_sm: Fix typo in debug message 2017-04-05 20:23:28 +02:00
Evgeniy Khramtsov
ad948d33c0 Add description to feature-not-implemented error 2017-04-05 15:19:00 +03:00
Evgeniy Khramtsov
6fa55e7c38 Set 'read_concurrency' for some ETS tables 2017-04-05 15:10:18 +03:00
Evgeniy Khramtsov
2febbe5ffb Don't misuse monotonic_time/0 2017-04-05 10:42:42 +03:00
Evgeniy Khramtsov
f5b0cd1793 Don't log warning on successful ping reply 2017-04-04 17:14:24 +03:00
Evgeniy Khramtsov
3a0b4ad8da Merge branch 'master' of github.com:processone/ejabberd 2017-04-04 09:53:45 +03:00
Evgeniy Khramtsov
408f9b515e Fix c2s connection close on demand
Fixes #1652
2017-04-04 09:52:42 +03:00
Alexey Shchepin
f45dc46856 Forget prepared SQL queries on database connect (#1325) 2017-04-03 16:42:41 +03:00
Christophe Romain
b75780b9cd Always init pubsub_index when using mnesia 2017-04-03 12:13:20 +02:00
Alexey Shchepin
19614678e9 Change mnesia dir detection 2017-04-03 12:57:47 +03:00
Christophe Romain
55ea097bce Remove obsolete mnesia migration calls
Now that plugins directly use ejabberd_mnesia and can include their own
transform handler, we don't need pubsub_migrate anymore.

People upgrading from 2.1.1x version must upgrade to 17.01 first.
pubsub_migrate module remains to support any manual process requiring it
2017-04-03 11:37:07 +02:00
Evgeniy Khramtsov
9d9037856c Improve redis related code 2017-04-02 11:56:09 +03:00
Evgeniy Khramtsov
5087e9c2df Use ejabberd_sql:abort/1 instead of exit/1 2017-03-31 19:10:07 +03:00
Evgeniy Khramtsov
178a0a3e1b Merge branch 'master' of github.com:processone/ejabberd 2017-03-31 19:08:16 +03:00
Evgeniy Khramtsov
05ef009552 Add Redis as mod_proxy65 RAM backend 2017-03-31 19:07:56 +03:00
Alexey Shchepin
316da00345 Add ejabberd_sql:abort/1 and ejabberd_sql:restart/1 2017-03-31 17:37:24 +03:00
Evgeniy Khramtsov
f449df161a Add SQL as mod_proxy65 RAM backend 2017-03-31 08:16:28 +03:00