25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

1103 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
4e39f4cab1 o Remove compatibility code. Use the atom 'undefined' in JIDs (normal
and short).
o  Add try/catch blocks where Exmpp can raise exceptions.
o  Remove some unused code.
o  Convert on-disk Mnesia database: JIDs, extra XML elements and
askmessage are concerned.
o  By default, 'askmessage' is now an empty binary instead of an empty
string, for consistency's sake.
o  Fix some bugs.

SVN Revision: 1547
2008-08-26 13:59:04 +00:00
Jean-Sébastien Pédron
9f0d79da9a o Use the new functions from jlib.
o  Remove the compatibility code. It's becoming confusing to handle every
case every where. Also, in JIDs (normal and short), the atom "undefined'
is expected, not the empty string anymore!

SVN Revision: 1546
2008-08-26 13:38:49 +00:00
Jean-Sébastien Pédron
80fcd2eb56 Remove commented-out code and use proper variable names.
SVN Revision: 1545
2008-08-26 13:00:35 +00:00
Jean-Sébastien Pédron
5aead42964 Use the new short_prepd_jid/1 function from jlib.
SVN Revision: 1544
2008-08-26 12:58:13 +00:00
Jean-Sébastien Pédron
ab75683bc9 short_jid/1 and short_bare_jid/1 now produce a short JID from the
user-provided JID parts. To obtain a short JID from the STRINGPREP'd
parts, use the new short_prepd_jid/1 and short_prepd_bare_jid/1
functions.

SVN Revision: 1543
2008-08-26 12:56:45 +00:00
Jean-Sébastien Pédron
d8c3aae412 Convert to the new #iq record from Exmpp.
SVN Revision: 1524
2008-08-14 13:36:11 +00:00
Jean-Sébastien Pédron
5e78c53572 Remove the compatibility layer and always call modules with the new #iq
record from Exmpp.

SVN Revision: 1523
2008-08-14 13:34:30 +00:00
Jean-Sébastien Pédron
44d3e844a3 Accept 'undefined' as a language and treat it as the empty string.
SVN Revision: 1522
2008-08-14 13:32:31 +00:00
Jean-Sébastien Pédron
85c2097ece Update to use the new names used in exmpp_jid.
SVN Revision: 1515
2008-08-06 13:51:42 +00:00
Jean-Sébastien Pédron
cb20c9b0d7 Update to use the new exmpp_xml:get_attribute/{3,4} API.
SVN Revision: 1514
2008-08-06 13:46:23 +00:00
Jean-Sébastien Pédron
d9a493561b Convert to exmpp.
SVN Revision: 1513
2008-08-06 13:44:58 +00:00
Jean-Sébastien Pédron
70956ece12 Convert to exmpp.
SVN Revision: 1492
2008-07-25 14:26:59 +00:00
Jean-Sébastien Pédron
adaf392156 o Finish conversion to exmpp for mod_caps.
o  In ejabberd_loca, IQ response handler are now always called with
arguments in the new format.

SVN Revision: 1469
2008-07-22 14:51:19 +00:00
Jean-Sébastien Pédron
37b99639d4 Convert to exmpp.
SVN Revision: 1468
2008-07-22 14:03:11 +00:00
Jean-Sébastien Pédron
a8ab6c1568 Add support for #xmlel to parse_xdata_submit/1 and friends. This fixes
the user search in mod_vcard.

SVN Revision: 1466
2008-07-21 15:54:47 +00:00
Jean-Sébastien Pédron
4a1e45070e One call to jlib:jid_to_string/1 was remaining.
SVN Revision: 1465
2008-07-21 15:53:58 +00:00
Jean-Sébastien Pédron
b33ac47228 Convert to exmpp.
SVN Revision: 1464
2008-07-21 15:30:32 +00:00
Jean-Sébastien Pédron
6e91399922 Convert to exmpp.
SVN Revision: 1463
2008-07-21 15:29:52 +00:00
Jean-Sébastien Pédron
75a8be230b Prepare gen_iq_handler to pass arguments in the new format to a built-in
list of modules known to support them. Other modules will still receive
arguments in the old format.

SVN Revision: 1462
2008-07-21 15:28:44 +00:00
Jean-Sébastien Pédron
07b1210b50 Merge revisions from 1444 to revision 1457 from trunk.
SVN Revision: 1458
2008-07-17 15:33:50 +00:00
Jean-Sébastien Pédron
532e8ee228 Start conversion to exmpp. For now, only direct calls from ejabberd_c2s
are done. Calls through gen_iq_handler aren't.

SVN Revision: 1457
2008-07-17 15:26:48 +00:00
Jean-Sébastien Pédron
574dbbfd08 Merge revisions from 1434 to revision 1444 from trunk.
SVN Revision: 1445
2008-07-15 08:45:05 +00:00
Jean-Sébastien Pédron
332fb55e3a MFC:
Merge revisions from 1362 to revision 1434 from trunk.

SVN Revision: 1435
2008-07-11 12:48:27 +00:00
Jean-Sébastien Pédron
5610d00b4d Convert to exmpp. Note that this module hasn't been tested yet!
SVN Revision: 1434
2008-07-11 12:41:48 +00:00
Jean-Sébastien Pédron
8bfccb42a9 Exmpp now takes care of stanza serialization and compatible namespaces.
SVN Revision: 1433
2008-07-11 12:40:49 +00:00
Jean-Sébastien Pédron
7ca5bebab3 Convert to exmpp.
SVN Revision: 1422
2008-07-09 09:16:03 +00:00
Jean-Sébastien Pédron
d5aa4be7e5 Convert #xmlelement returned by the 'c2s_stream_features' hook to
#xmlel.

SVN Revision: 1421
2008-07-09 09:14:19 +00:00
Jean-Sébastien Pédron
1a687a4f1a SASL errors are now atoms, not strings anymore.
SVN Revision: 1420
2008-07-08 15:43:52 +00:00
Jean-Sébastien Pédron
13b78b1ad2 Routing is now done with #xmlel. A warning is printed if those modules
have to route an old #xmlelement.

SVN Revision: 1406
2008-07-01 15:51:34 +00:00
Jean-Sébastien Pédron
48cf5cb84a Do not use the #iq record anymore internally. However it's still created
and passed to other modules.

SVN Revision: 1405
2008-07-01 14:25:02 +00:00
Jean-Sébastien Pédron
5317dd64d7 Change warning message.
SVN Revision: 1404
2008-07-01 14:20:20 +00:00
Jean-Sébastien Pédron
a25609f66b Accept new #xmlel in functions that create #iq. A warning is printed
when these functions are called with an old #xmlelement.

SVN Revision: 1403
2008-07-01 14:19:36 +00:00
Jean-Sébastien Pédron
d6e6432a46 Convert to exmpp.
SVN Revision: 1402
2008-07-01 13:34:51 +00:00
Jean-Sébastien Pédron
094fa47f9f Convert gen_iq_handler to exmpp.
SVN Revision: 1401
2008-07-01 10:21:35 +00:00
Jean-Sébastien Pédron
6f7cf2e58b Use a function to convert to old structures instead of duplicating code
inside the module.

SVN Revision: 1400
2008-07-01 10:20:01 +00:00
Jean-Sébastien Pédron
ffbf8d5faa Convert acl to exmpp.
SVN Revision: 1398
2008-07-01 09:41:32 +00:00
Jean-Sébastien Pédron
f55274c7fb o Use jlib:short_bare_jid/1.
o  Rewrite is_auth_packet/1 to use new formats.
o  Don't convert <presence/> before calling ejabberd_sm:set_presence/7.
o  Don't convert broadcast children, because it's an internal special
element.

SVN Revision: 1397
2008-07-01 09:17:48 +00:00
Jean-Sébastien Pédron
b9074097da Forgot to convert a <presence/> from the new to the old record.
SVN Revision: 1396
2008-07-01 09:13:49 +00:00
Jean-Sébastien Pédron
83a33726ce Add function short_bare_jid/1.
SVN Revision: 1395
2008-07-01 09:12:59 +00:00
Jean-Sébastien Pédron
8c33e12616 Use the new clause of exmpp_stanza:reply_with_error/2, exmpp_iq:error/2,
exmpp_iq:error_without_original/2 and the new exmpp_jid:make_bare_jid/1.

SVN Revision: 1394
2008-07-01 08:01:06 +00:00
Jean-Sébastien Pédron
87218e1447 Convert to exmpp.
SVN Revision: 1393
2008-07-01 07:49:57 +00:00
Jean-Sébastien Pédron
06965000a5 Before doing any routing, the router print a warning if old structures
are used. Then it converts the structures to the old format and route
them. The router doesn't care about the structures format but the
conversion is necesary for code called from this module.

In C2S and S2S, no conversion is done before calling
ejabberd_router:route/3.

SVN Revision: 1392
2008-06-30 16:55:03 +00:00
Jean-Sébastien Pédron
cc033b3b98 o Use the new functions from jlib.
o  Use the new exmpp_xml:node_to_list/3.

SVN Revision: 1391
2008-06-30 15:51:23 +00:00
Jean-Sébastien Pédron
290040ad9d o Add function to convert to and from old ejabberd #jid record.
o  Move function short_jid/1 from ejabberd_c2s.

SVN Revision: 1390
2008-06-30 15:49:58 +00:00
Jean-Sébastien Pédron
264e72830b Convert to exmpp.
SVN Revision: 1389
2008-06-30 14:04:31 +00:00
Jean-Sébastien Pédron
d05c2ee8a1 Use -include_lib instead of -include to include exmpp.hrl. This is a
better solution than specifying the path (with -I) on erlc(1) command
line.

SVN Revision: 1388
2008-06-30 12:13:15 +00:00
Jean-Sébastien Pédron
b32aba27c1 o Use the new exmpp namespace macro names.
o  Update send_element/2 to use exmpp new to_list functions.

SVN Revision: 1384
2008-06-27 13:46:08 +00:00
Jean-Sébastien Pédron
22e79490ff Convert to exmpp.
SVN Revision: 1383
2008-06-26 15:48:19 +00:00
Jean-Sébastien Pédron
1a311a30b5 o Use a macro in ?DEFAULT_NS instead of the namespace atom directly.
o  Comment DBGFSM our again.
o  Remove macro ERR_SERVICE_UNAVAILABLE.
o  In wait_for_auth and is_auth_packet, an empty resource is returned as
'undefined', not the empty string in the {auth, ...} tuple.
o  In handle_sync_event, remove a debugging printf.
o  In handle_info({route, ...}), use macro IS_PRESENCE & friends instead
of direct matching with NS_JABBER_CLIENT and name. This way, the S2S
doesn't have to change the namespace of all its incoming stanzas to
NS_JABBER_CLIENT.
o  In send_element, for stanzas under the NS_JABBER_SERVER namespace, lie
to exmpp_xml by telling it that this namespace is the default one.

SVN Revision: 1382
2008-06-26 15:47:21 +00:00
Jean-Sébastien Pédron
999f3233bb Fix short JID comparison in get_subscribed_and_online; it was using
'undefined' instead of empty strings.

SVN Revision: 1381
2008-06-25 13:27:03 +00:00
Jean-Sébastien Pédron
07651d712f Finish ejabberd_c2s conversion with the functions related to offline
stanzas.

SVN Revision: 1380
2008-06-25 12:37:45 +00:00
Jean-Sébastien Pédron
6f931ce4fd Convert all presence-related functions.
SVN Revision: 1378
2008-06-24 16:12:56 +00:00
Jean-Sébastien Pédron
e93e846e16 o Use the new exmpp_stream:opening_reply/3 function in wait_for_stream/2.
o  The function terminate/3 is converted to exmpp.

SVN Revision: 1377
2008-06-24 09:44:56 +00:00
Jean-Sébastien Pédron
4e2e68a3fb The handle_info clause that treats routing order is now converted.
In-memory sets and dict still use the short JID form with empty strings
for unspecified fields. Users are able to connect to ejabberd but some
features don't seem to work proprerly.

SVN Revision: 1376
2008-06-24 08:55:24 +00:00
Jean-Sébastien Pédron
e95df7999f Convert JID to the expected form outside of the C2S (empty fields must
be set to the empty string). This fixes the broken routing.

SVN Revision: 1375
2008-06-23 11:47:10 +00:00
Jean-Sébastien Pédron
2a43998444 o Change the usage of #state.lang somewhat.
o  Fix value of DefaultLang: it doesn't contain the whole serialized
attribute.
o  Use exmpp_jid:make_bare_jid/2 more.

I started to work on the second half of the module and discovered
several annoying things:
o  JID are represented in two forms: the #jid record and the
{N, D, R} tuple.
o  Sometimes, #xmlelement may contain non-#xml* tuples in their
children. This is the case for some <presence/> stanzas. Their
children are used to pass random data.
I'm less and less convicted that ejabberd_c2s can be fully converted
without starting to work on other modules.

SVN Revision: 1370
2008-06-20 14:54:59 +00:00
Jean-Sébastien Pédron
389b5e6448 First bunch of modifications to use exmpp. All FSM state function are
updated. But other functions are not for now.

Users are able to connect to ejabberd but some features may not work.

SVN Revision: 1368
2008-06-20 12:52:29 +00:00
Jean-Sébastien Pédron
a19f280fcc Enable the new #xmlel record.
SVN Revision: 1367
2008-06-20 12:50:20 +00:00
Jean-Sébastien Pédron
e4646a6788 Add exmpp detection.
SVN Revision: 1366
2008-06-20 12:49:39 +00:00
Jean-Sébastien Pédron
58bfea2ad1 Replace the use of xml_stream by exmpp_xmlstream. exmpp_xml is
configured to produce old #xmlelement records. exmpp_xmlstream is
configured to send old xmlstreamstart tuple.

Users are able to connect to ejabberd. 

Next step: ejabberd_c2s.

SVN Revision: 1365
2008-06-19 10:23:52 +00:00
Badlop
5fdcb52306 * src/ejabberd.app: The ejabberd version number is defined in the
OTP application resource file, in the key 'vsn' (EJAB-657)
* src/ejabberd.hrl: The macro VERSION now consults the ejabberd
application key vsn
* src/configure.erl: Load the ejabberd application description
* doc/Makefile: Read ejabberd version from ejabberd.app vsn
* doc/api/Makefile: Likewise

SVN Revision: 1361
2008-06-18 21:33:48 +00:00
Christophe Romain
638d789ae6 pubsub get_default bugfix (EJAB-656)
SVN Revision: 1358
2008-06-18 16:19:18 +00:00
Badlop
cbf63d06a8 * src/mod_muc/mod_muc_room.erl: Allow admins to send messages to
rooms even if not joined (EJAB-645)
* doc/guide.tex: Likewise
* doc/guide.html: Likewise

SVN Revision: 1356
2008-06-13 18:55:26 +00:00
Badlop
e22913d46f * src/ejabberd.cfg.example: Add registration_timeout (EJAB-653)
SVN Revision: 1355
2008-06-13 17:51:01 +00:00
Badlop
44e0a17d80 * doc/guide.tex: Title in HTML is shorter. Update several external URIs.
SVN Revision: 1354
2008-06-13 15:25:57 +00:00
Badlop
8f7d9de0b6 * doc/guide.tex: Document ldap_local_filter (EJAB-179)
SVN Revision: 1353
2008-06-13 10:13:44 +00:00
Badlop
d27f41a9e8 * doc/guide.tex: Table of listener modules converted to
description. Table of modules overview simplified, and module
names link to their sections.
* doc/guide.html: Regenerated with all the latest changes

SVN Revision: 1352
2008-06-12 23:52:13 +00:00
Badlop
795263b5d4 * doc/guide.tex: Fix indentation of verbatim text
SVN Revision: 1351
2008-06-12 23:01:09 +00:00
Badlop
a8140bca89 * doc/guide.tex:
Changes in CSS: verbatim text is indented and has grey background;
descriptions are indented; table borders are softer.

SVN Revision: 1350
2008-06-12 22:00:51 +00:00
Badlop
9507a0001d * doc/guide.tex: Permanent reference URL for sections (EJAB-651)
SVN Revision: 1349
2008-06-12 21:54:30 +00:00
Badlop
ff94e586eb * src/ejabberd_c2s.erl: Bugfix: deliver messages when first
presence is Invisible (thanks to Dariusz Markowicz)(EJAB-262)

SVN Revision: 1348
2008-06-09 23:43:47 +00:00
Badlop
be8d1902d0 * doc/guide.tex: Small fixes (thanks to Christoph Anton Mitterer)
* doc/introduction.tex: Likewise
* doc/guide.html: Likewise

SVN Revision: 1347
2008-06-08 16:52:25 +00:00
Badlop
95462d3f25 * doc/guide.tex: Document ejabberdctl status code (EJAB-633)
* doc/guide.html: Likewise

SVN Revision: 1346
2008-06-05 12:04:43 +00:00
Badlop
59201f1def * src/msgs/pl.msg: Bugfix in arguments of translated string that
could crash the room (thanks to Anastasia Gornostaeva)

SVN Revision: 1345
2008-06-04 13:21:36 +00:00
Badlop
1e345eb0fc * src/web/ejabberd_web.erl (make_xhtml/2): Allow to include
elements in the HTTP header

SVN Revision: 1344
2008-05-31 18:21:43 +00:00
Badlop
110a4b4518 * src/odbc/odbc_queries.erl (del_user_return_password): Return
password (thanks to Oleg Palij)

SVN Revision: 1343
2008-05-31 17:09:13 +00:00
Mickaël Rémond
5e9576ffa3 * src/ejabberd_s2s.erl: Added s2s_send_packet and s2s_receive_packet hooks (EJAB-635).
* src/ejabberd_s2s_in.erl: Likewise.

SVN Revision: 1342
2008-05-22 10:53:49 +00:00
Mickaël Rémond
cf42ea0bcb * src/ejabberd_c2s.erl: user_send_packet hook now called on all packets including presence packets (EJAB-634)
SVN Revision: 1341
2008-05-22 10:19:35 +00:00
Badlop
c4366a54cc * README: R12 support: remove compilation warning (EJAB-630)
SVN Revision: 1340
2008-05-22 00:01:18 +00:00
Badlop
9bdaa45981 * doc/guide.html: Update
SVN Revision: 1335
2008-05-19 09:45:44 +00:00
Badlop
30f54a6bfc * src/configure.ac: R12 support: remove compilation
warning (EJAB-630)
* src/configure: Likewise
* doc/guide.tex: Likewise

SVN Revision: 1334
2008-05-19 09:20:35 +00:00
Badlop
b503e02b09 * doc/guide.tex: Describe how to disable registration
limitation (EJAB-614)

SVN Revision: 1333
2008-05-19 09:13:19 +00:00
Mickaël Rémond
8a8a02431f * src/ejabberd_s2s_out.erl: Avoid an harmless error (function clause in logs)
SVN Revision: 1331
2008-05-18 12:28:58 +00:00
Badlop
4e77bae206 * src/extauth.erl: Log strange responses from extauth script. Use
timeout (EJAB-627)

SVN Revision: 1330
2008-05-17 11:44:25 +00:00
Christophe Romain
5bec1eedc1 Change FSMTIMEOUT to 30s
SVN Revision: 1328
2008-05-16 15:29:33 +00:00
Badlop
da56452fba * src/mod_muc/mod_muc_room.erl: Return Forbidden error message
when user sends private message in a room that disallows
it (EJAB-595)

SVN Revision: 1323
2008-05-12 20:35:43 +00:00
Badlop
98e47e8c73 * src/web/ejabberd_http.erl (parse_auth): Allow password that
include colon character (EJAB-522)

SVN Revision: 1322
2008-05-12 17:56:27 +00:00
Mickaël Rémond
977a20700a * src/mod_ip_blacklist.erl: Better error handling (EJAB-625).
SVN Revision: 1321
2008-05-09 19:53:06 +00:00
Mickaël Rémond
a664579b58 * src/ejabberd_c2s.erl: Added C2S blacklist support (EJAB-625).
* src/mod_ip_blacklist.erl: Likewise.
* src/jlib.erl: Added IP format tuple to string function.
* src/ejabberd_socket.erl: Properly handled c2s start failure (happen for blacklisted IP).

SVN Revision: 1317
2008-05-05 16:22:06 +00:00
Alexey Shchepin
8267194d5e * src/ejabberd_receiver.erl: Don't activate a socket untill its
receiver process is controlling it

SVN Revision: 1316
2008-05-04 07:38:24 +00:00
Christophe Romain
2304f8cbc8 XEP-0115 patch (EJAB-618)
SVN Revision: 1313
2008-04-30 08:49:39 +00:00
Badlop
ef531fb208 * src/ejabberd_s2s_out.erl: Improve confusing log message in s2s
connection: wait_for_validation connect timeout (EJAB-617)

SVN Revision: 1311
2008-04-29 16:59:03 +00:00
Badlop
e5879f4349 * src/ejabberd.cfg.example: Small improvements in explanations
* doc/guide.tex: Document MUC room options (EJAB-619)

SVN Revision: 1310
2008-04-29 16:44:12 +00:00
Badlop
1cbfc60570 * doc/guide.tex: Document the option max_s2s_connections
SVN Revision: 1307
2008-04-28 18:07:23 +00:00
Christophe Romain
edf1ed5c87 remove unused served_hosts option
SVN Revision: 1306
2008-04-28 13:02:07 +00:00
Alexey Shchepin
85d3b27d71 * src/mod_muc/mod_muc_room.erl: Fixed room shaper processing
SVN Revision: 1305
2008-04-27 19:06:34 +00:00
Badlop
4c937ab94e * src/mod_shared_roster.erl: Fix for new registered accounts not
being immediately shown in an 'all' special shared roster
group (thanks to Alexey Shchepin) (EJAB-71)
* src/mod_register.erl: New vhost event user_registered

SVN Revision: 1303
2008-04-26 17:37:43 +00:00
Badlop
0b5720906c * doc/guide.tex: Document option registration_timeout (EJAB-614)
SVN Revision: 1302
2008-04-25 22:45:45 +00:00
Badlop
c88a4650ba * src/ejabberd_c2s.erl: Added forbidden_session_hook
* src/acl.erl: New access types: resource, resource_regexp and
resource_glob
* doc/guide.tex: Likewise

SVN Revision: 1301
2008-04-25 09:25:31 +00:00
Alexey Shchepin
b1756e8e34 * src/treap.erl: Bugfix
* src/mod_register.erl: Fixed table creation, timeout isn't
activated when registration fails

SVN Revision: 1300
2008-04-23 13:14:08 +00:00