25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-04 15:36:57 +01:00
Commit Graph

1164 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
7088ba88a9 o In store_last_info/4, fix a bug where the status was not converted to
list before calling ejabberd_odbc:escape/1.
o  In get_last_info/2, fix a bug where the status was returned as a list
instead of a binary.

SVN Revision: 1690
2008-12-01 12:16:41 +00:00
Jean-Sébastien Pédron
0313adaec6 Convert to exmpp.
PR:		EJABP-1

SVN Revision: 1663
2008-10-20 10:34:00 +00:00
Jean-Sébastien Pédron
50b1e4c36f Convert to exmpp.
The admin web interface is working but HTTP polling seems broken in the
trunk.

PR:		EJABP-1

SVN Revision: 1654
2008-10-13 15:36:43 +00:00
Jean-Sébastien Pédron
a94caf218f Remove all deprecated functions from jlib.
This was accidentally committed with the merge.

PR:		EJABP-1

SVN Revision: 1651
2008-10-13 11:43:33 +00:00
Jean-Sébastien Pédron
ab2b70f189 Merge from trunk (r1613 to 1649).
PR:		EJABP-1

SVN Revision: 1650
2008-10-13 10:11:19 +00:00
Jean-Sébastien Pédron
3190c0ed6c Convert to exmpp.
PR:		EJABP-1

SVN Revision: 1649
2008-10-13 09:39:58 +00:00
Jean-Sébastien Pédron
461a5eb315 Convert to exmpp.
PR:		EJABP-1

SVN Revision: 1648
2008-10-13 09:39:18 +00:00
Jean-Sébastien Pédron
01ef834b82 Remove the deprecated list of converted modules.
PR:		EJABP-1

SVN Revision: 1647
2008-10-13 09:38:34 +00:00
Jean-Sébastien Pédron
0211c8145d Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1.
PR:		EJABP-1

SVN Revision: 1646
2008-10-13 09:37:48 +00:00
Jean-Sébastien Pédron
4a9892fa15 Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1628
2008-10-10 15:24:47 +00:00
Jean-Sébastien Pédron
71bfefa788 Convert to exmpp.
PR:		EJABP-1

SVN Revision: 1627
2008-10-10 15:23:58 +00:00
Jean-Sébastien Pédron
071c858055 Don't start stringprep_sup.
PR:		EJABP-1

SVN Revision: 1626
2008-10-10 14:58:35 +00:00
Jean-Sébastien Pédron
0244963935 Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1625
2008-10-10 14:57:44 +00:00
Jean-Sébastien Pédron
3adb238b31 Fix a bug where the wrong module was called (jlib instead of exmpp_jid).
PR:		EJABP-1

SVN Revision: 1624
2008-10-10 14:41:26 +00:00
Jean-Sébastien Pédron
e3100110f0 Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1623
2008-10-10 14:40:04 +00:00
Jean-Sébastien Pédron
5224a796cc Replace jlib:iq_to_xml/1 by exmpp_iq:iq_to_xmlel/1.
PR:		EJABP-1

SVN Revision: 1622
2008-10-10 14:38:52 +00:00
Jean-Sébastien Pédron
285b3858dd Replace jlib:*prep/1 by exmpp_stringprep:*prep/1 and change the error
handling.

PR:		EJABP-1

SVN Revision: 1621
2008-10-10 14:37:26 +00:00
Jean-Sébastien Pédron
53bea055aa Remove a remaining jlib:jid_remove_resource/1 call.
PR:		EJABP-1

SVN Revision: 1620
2008-10-10 14:36:25 +00:00
Jean-Sébastien Pédron
129b0e99cf Replace jlib:nodeprep/1 by exmpp_stringprep:nodeprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1619
2008-10-10 14:35:17 +00:00
Jean-Sébastien Pédron
c0e4af9ac0 Replace jlib:nameprep/1 by exmpp_stringprep:nameprep/1 and change the
error handling.

PR:		EJABP-1

SVN Revision: 1618
2008-10-10 14:33:16 +00:00
Jean-Sébastien Pédron
ccd94bb734 Fix a buf where a tuple was passed to exmpp_jid:jid_to_list/1 instead of
a #jid. Now we use exmpp_jid:jid_to_list/3.

PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1617
2008-10-10 08:16:29 +00:00
Jean-Sébastien Pédron
e1b3bd611d Fix a bug where legacy authentication informations were not search among
the query children but among the IQ children.

PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1616
2008-10-10 08:14:08 +00:00
Jean-Sébastien Pédron
6ab7e339bd Fix handling of unauthenticated stanzas which are not request IQ.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1615
2008-10-09 11:54:42 +00:00
Jean-Sébastien Pédron
67a87af459 Merge from trunk (r1563 to r1613).
PR:		EJABP-1

SVN Revision: 1614
2008-10-08 12:02:30 +00:00
Jean-Sébastien Pédron
aaecdc4b8a Convert to exmpp.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1611
2008-10-07 12:20:09 +00:00
Jean-Sébastien Pédron
78466384c4 Convert to exmpp.
PR:		EJABP-1

SVN Revision: 1610
2008-10-07 09:55:38 +00:00
Jean-Sébastien Pédron
ca7a0813b4 Fix a bug where an error stanza was not created correctly, leading to
ejabberd_c2s crash.

PR:		EJABP-1

SVN Revision: 1609
2008-10-07 09:54:53 +00:00
Jean-Sébastien Pédron
bc0d8613ab Fix status handling by always using binaries: until now, we were mixing
lists and binaries in a non-working way.

PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1608
2008-10-06 15:16:09 +00:00
Jean-Sébastien Pédron
0434c1424a The Mnesia table wasn't updated when converting from an old schema.
PR:		EJABP-1

SVN Revision: 1607
2008-10-06 15:14:01 +00:00
Jean-Sébastien Pédron
3f8a303286 Convert to exmpp.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1606
2008-10-06 15:01:36 +00:00
Jean-Sébastien Pédron
5ceffdd5a7 Fix a confusion between #jid and tuples.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1604
2008-10-06 15:00:34 +00:00
Jean-Sébastien Pédron
01da93bf70 mod_privacy & friends may return an empty list.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1603
2008-10-06 14:58:45 +00:00
Jean-Sébastien Pédron
028a3c2ded Fix a bug where we were matching on #iq.type instead of #iq.kind,
resulting in bad-request sent to the client.

PR:		EJABP-1

SVN Revision: 1602
2008-10-06 14:56:36 +00:00
Jean-Sébastien Pédron
1698b8ec04 o In start/2 and stop/1, the IQ registration must use a namespace as
atom, not list.
o  The functions process_local_iq/3, process_sm_iq/3 and get_last/3
receive an #iq, not an #xmlel.
o  In store_last_info/4 and remove_user/2, add try/catch block around
exmpp_stringprep:*prep/1 uses.

SVN Revision: 1594
2008-10-02 14:59:48 +00:00
Jean-Sébastien Pédron
9e018532c8 o In #jid, when the node isn't specified, it defaults to the atom
"undefined", not an empty binary.
o  Fix a bug where we expected an #xmlelement to have only one #xmlcdata
child.

SVN Revision: 1593
2008-10-02 13:52:39 +00:00
Jean-Sébastien Pédron
24cb7cb039 exmpp_xml:get_element_by_name/2 is deprecated; use
exmpp_xml:get_element/2 instead.

SVN Revision: 1592
2008-10-02 13:34:52 +00:00
Jean-Sébastien Pédron
7c28aba6a1 Fix a bug where a JID represented as a tuple was used in a function
expecting a #jid.

PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1591
2008-10-02 13:17:49 +00:00
Jean-Sébastien Pédron
2309f9b8bc Fix multiple bugs in ODBC mods.
PR:		EJABP-1
Submitted by:	Pablo Polvorin <pablo.polvorin@process-one.net>

SVN Revision: 1589
2008-10-01 09:41:57 +00:00
Jean-Sébastien Pédron
ddcb94649d Fill exmpp_xml known list with the nss/names/attrs used by this module.
SVN Revision: 1585
2008-09-29 13:19:11 +00:00
Jean-Sébastien Pédron
5f7e16eac3 Add the {autoload_known, true} flag to the XML parser options. This
allows modules to extend the known nss/names/attrs with their own data.

SVN Revision: 1584
2008-09-29 13:17:21 +00:00
Jean-Sébastien Pédron
da034b3090 Fix a bug in #xmlel construction: children must be a list.
SVN Revision: 1583
2008-09-29 11:30:25 +00:00
Jean-Sébastien Pédron
12d515a8fe Convert to exmpp (not tested yet).
SVN Revision: 1582
2008-09-29 11:29:09 +00:00
Jean-Sébastien Pédron
f5f3c85112 Remove compatibility code (not tested yet).
SVN Revision: 1581
2008-09-29 10:38:04 +00:00
Jean-Sébastien Pédron
d8153b702a o Add try/catch block around exmpp_stringprep:*prep/1 uses.
o  Add table conversion.
o  In get_last/3, do not convert status to binary because it's already
one.

SVN Revision: 1580
2008-09-29 10:34:06 +00:00
Jean-Sébastien Pédron
9a4f5bb2d9 When the status is not specified in a presence stanza, default to an
empty binary, not an empty string; this is what mod_last expects.

SVN Revision: 1579
2008-09-29 10:31:24 +00:00
Jean-Sébastien Pédron
7624284070 Remove compatilibity code.
SVN Revision: 1578
2008-09-29 09:42:46 +00:00
Jean-Sébastien Pédron
c32cbd90e8 Fix a bug in parse_xdata_submit/1 and parse_xdata_fields/2 where
exmpp_xml:get_attribute_from_list/3 was called with only 2 arguments;
this code has not been updated when exmpp_xml's API changed...

SVN Revision: 1577
2008-09-29 09:42:05 +00:00
Jean-Sébastien Pédron
c068d20588 In mod_offline:
o  Remove any compatibility code: the core of Ejabberd expects new
structures.
o  Add table conversion.
o  Add try/catch block around exmpp_stringprep:*prep/1 uses.

To permit the complete removal of the compatibility code, jlib had to be
changed too: the timestamp_to_xml/1 function now returns an #xmlel.

SVN Revision: 1575
2008-09-25 10:46:00 +00:00
Jean-Sébastien Pédron
c74ab439ef Convert to exmpp.
SVN Revision: 1574
2008-09-23 13:11:05 +00:00
Jean-Sébastien Pédron
44c77364ce Fix a typo in the exmpp_stringprep module name.
SVN Revision: 1573
2008-09-23 13:10:33 +00:00
Jean-Sébastien Pédron
0dbbf53fbe o Fix a misuse of exmpp_stanza:error/2: the namespace argument (the
first one) was missing.
o  Fix a bug in process_privacy_iq/4 where the #iq record was not
converted back to an #xmlel before calling ejabberd_router:route/3.

SVN Revision: 1572
2008-09-23 13:09:32 +00:00
Jean-Sébastien Pédron
052d006c88 Fix a typo in the exmpp_stringprep module name.
SVN Revision: 1571
2008-09-23 13:06:45 +00:00
Jean-Sébastien Pédron
0e91ea9e5f o Fix a bug in process_sm_iq/3 where a badmatch exception was raised
when the user didn't have a vCard.
o  Fix a bug in remove_user/2 where the exmpp_jid module was use instead
of exmpp_stringprep.

SVN Revision: 1570
2008-09-23 13:05:43 +00:00
Jean-Sébastien Pédron
5803c51633 Convert to exmpp.
SVN Revision: 1568
2008-09-22 11:18:08 +00:00
Jean-Sébastien Pédron
35a7342416 o Remove unappropriate comments in get_sm_features/5.
o  Use the '_s' variants of NS_* macros instead of a call to
atom_to_list/1 in do_route/4.
o  A call to the stringprep module was left in filter_fields/3.

SVN Revision: 1567
2008-09-22 11:17:23 +00:00
Jean-Sébastien Pédron
e9d7ac68da o Fix a bug in get_in_pending_subscriptions() where the type of the
presence stanza was lost.
o  Reorganize a few lines in user_roster() to match mod_roster_odbc.

SVN Revision: 1566
2008-09-18 14:55:43 +00:00
Jean-Sébastien Pédron
56a0c8ed1d Convert to exmpp.
SVN Revision: 1565
2008-09-18 14:55:03 +00:00
Jean-Sébastien Pédron
4eaa8e19c9 Merge from trunk (r1457 to r1563).
SVN Revision: 1564
2008-09-16 14:39:57 +00:00
Jean-Sébastien Pédron
414948d822 VCard are now stored as #xmlel. Mnesia tables are converted during
startup.

SVN Revision: 1553
2008-08-27 12:39:49 +00:00
Jean-Sébastien Pédron
02e6bf8759 handle_cast({disco_response, ...}, ...) now receives an #iq record:
update the code to handle this.

SVN Revision: 1552
2008-08-27 09:46:25 +00:00
Jean-Sébastien Pédron
8baed08641 Remove a debugging io:format/2.
SVN Revision: 1551
2008-08-27 09:45:01 +00:00
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