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

98 Commits

Author SHA1 Message Date
Badlop
007cafa7cd Fix EDoc errors.
SVN Revision: 2495
2009-08-17 17:17:34 +00:00
Badlop
4f6b67b190 Move functions from roster_versioning to mod_roster (EJAB-964)
SVN Revision: 2431
2009-08-06 21:07:18 +00:00
Pablo Polvorin
1b85310f1a Support for roster versioning (EJAB-964)
Introduces two options for mod_roster and mod_roster_odbc:
- {versioning, true | false}   Enable or disable roster versioning on ejabberd.
- {store_current_id, true | false}   If true, the current roster version is stored on DB (internal or odbc). Otherwise it is calculated on the fly each time.

Performance:
Setting store_current_id to true should help in reducing the load for both ejabberd and the DB.

Details: 
If store_current_id is false,  the roster version is a hash of the entire roster. If store_current_id is true, the roster version is a hash, but of the current time
(this has to do with transactional semantics; we need to perform both the roster update and the version update on the same transaction, but we don't   
have the entire roster when we are changing a single item on DB. Loading it there requires significant changes to be introduced, so I opted for this simpler approach).

In either case, there is no difference for the clients, the roster version ID is opaque.

IMPORTANT:
mod_shared_roster is not compatible with the option 'store_current_id'.  Shared roster and roster versioning can be both enabled, but store_current_id MUST be set to false.

SVN Revision: 2428
2009-08-06 15:45:13 +00:00
Pablo Polvorin
92ad67a814 Fix problems when deleting a roster item.
The deleted item was left on the user roster, and unsubscribe presence stanza wasn't sent to the unsubscribed user.

SVN Revision: 2420
2009-08-05 17:39:47 +00:00
Badlop
2b6f45e4c1 Update some calls from jlib:make_jid to exmpp_jid:make
SVN Revision: 2139
2009-06-01 23:44:55 +00:00
Karim Gemayel
9abe47f350 API renaming : jid_to_binary -> to_binary
SVN Revision: 2134
2009-06-01 16:59:08 +00:00
Karim Gemayel
7a884ced32 API renaming : bare_jid_to_list -> bare_to_list
SVN Revision: 2133
2009-06-01 16:54:33 +00:00
Karim Gemayel
15bc238297 API renaming : jid_to_list -> to_list
SVN Revision: 2131
2009-06-01 16:52:14 +00:00
Karim Gemayel
d5f2c41f26 API renaming : lnode -> prep_node
SVN Revision: 2125
2009-06-01 16:39:36 +00:00
Karim Gemayel
7eb395b87d API renaming : ldomain_as_list -> prep_domain_as_list
SVN Revision: 2124
2009-06-01 16:38:28 +00:00
Karim Gemayel
19d7d79229 API renaming : ldomain -> prep_domain
SVN Revision: 2123
2009-06-01 16:37:15 +00:00
Karim Gemayel
526dc54173 API renaming : parse_jid -> parse
SVN Revision: 2122
2009-06-01 16:35:55 +00:00
Karim Gemayel
5dbc4f9954 API renaming : jid_to_bare_jid > bare
SVN Revision: 2120
2009-06-01 16:30:15 +00:00
Karim Gemayel
447d3818f5 API renaming : make_jid -> make
SVN Revision: 2119
2009-06-01 16:26:00 +00:00
Badlop
0bbbf468f0 Fix crashes when browsing some WebAdmin pages (EJAB-821)
SVN Revision: 2111
2009-05-27 17:29:58 +00:00
Badlop
1d3947c0da Replace TYPE/1 with is_TYPE/1 (EJAB-922)
SVN Revision: 2057
2009-05-06 16:54:43 +00:00
Badlop
23ec55975e Merge 1877 from trunk.
* src/mod_roster.erl: When account is deleted, cancel presence
subscription for all roster items (EJAB-790)
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 1943
2009-03-03 18:57:47 +00:00
Pablo Polvorin
acae6e20de * Use exmpp_jid:to_binary/1 when possible.
* ejabberd_odbc:escape/1 now can escape binaries too. This 
avoid the need to convert a binary value to list() just to 
sql-escape it. The escaped value returned is allways a list() 
(ejabberd's odbc drivers only works on lists())

SVN Revision: 1914
2009-02-23 19:45:55 +00:00
Pablo Polvorin
4956259124 src/mod_roster.erl: Bugfix in remove_user/2, values already in binary() format.
SVN Revision: 1909
2009-02-21 18:07:37 +00:00
Jean-Sébastien Pédron
bf82bac328 o Document the type of the argument(s) and the returned type of every
functions.
o  Add guardians expression to exported functions to ensure at an early
stage that we were given the right arguments.
o  Fix table conversion to exmpp; many fields were left as string(),
preventing matching from working correctly.
o  In user_roster_item_parse_query/4, fix a bug where the same variable
was used for two distinct purpose.
o  In user_roster_item_parse_query/4, fix a bad usage of
exmpp_jid:jid_to_list/1.

PR:		EJABP-1

SVN Revision: 1867
2009-02-06 13:43:40 +00:00
Jean-Sébastien Pédron
842ebfcca0 A lot of bug fixes regarding attribute values type:
o  Fix some bugs by getting attributes as list() instead of binary().
o  Instead creating #xmlattr directly, use the new ?XMLATTR macro; it'll
take care of the anything-to-binary() conversion.
o  Fix a bug where recipient and sender were used as binary() instead of
list(), which is required by the rest of the S2S code.
o  Fix a bug where binary_to_list/1 was called on a list().

Now concerning JIDs :
o  Now that #jid{} isn't part of the API of Exmppp anymore, replace
remaining direct usages by calls to exmpp_jid.
o  Replace exmpp_jid:make_bare_jid() by exmpp_jid:make_jid().
o  Replace exmpp_jid:*_to_jid/1 by exmpp_jid:parse_jid/1.

PR:		EJABP-1

SVN Revision: 1841
2009-01-21 13:34:26 +00:00
Jean-Sébastien Pédron
fc77b48344 Merge from trunk (r1804 to r1829).
The merge party is over, you may now double-check that everything is in
place.

PR:		EJABP-1

SVN Revision: 1830
2009-01-19 15:27:07 +00:00
Jean-Sébastien Pédron
ff500d8297 Merge from trunk (r1787 to r1804).
Included are fixes to src/mod_configure.erl and src/mod_caps.erl.

Note: this merge doesn't include the following revisions because it was
made by previous commits:
r1766, r1768, r1781, r1783, r1794, r1797, r1799, r1802.

Warning: Ejabberd may be broken until the merge is completly finished.

PR:		EJABP-1

SVN Revision: 1829
2009-01-19 14:47:33 +00:00
Jean-Sébastien Pédron
25009ff9f4 Merge from trunk (r1764 to r1787).
Warning: Ejabberd may be broken until the merge is completly finished.

PR:		EJABP-1

SVN Revision: 1827
2009-01-19 11:59:40 +00:00
Pablo Polvorin
c77f7e727b Update gen_iq_handler API, require the 'Host' argument to be in binary() format.
Fix bug in vcard user search, odbc backend.

SVN Revision: 1796
2009-01-10 16:10:12 +00:00
Pablo Polvorin
98f51dc91f Adapt to new exmpp API where get_id/1, get_lang/1, get_initiating_entity/1, get_receiving_entity/1 and get_type/1 returns binary().
SVN Revision: 1791
2009-01-09 19:18:46 +00:00
Pablo Polvorin
e0e58711bb XML attributes as binary(). Change Node argument to binary in the following hooks:
disco_local_items, disco_local_features, disco_local_identity, disco_sm_items and 
disco_sm_identity.

SVN Revision: 1780
2009-01-08 14:54:00 +00:00
Pablo Polvorin
2cbd61f268 Fix typo in mod_roster
SVN Revision: 1773
2009-01-05 15:41:53 +00:00
Pablo Polvorin
4827db4f56 Big #jid to binary() conversion.
Internal tables (ejabberd_router, ejabberd_sm, ejabberd_hooks, mod_last, mod_roster) use binary() as storage.
Basic test using the ODBC backend.

SVN Revision: 1770
2009-01-03 15:15:38 +00:00
Jean-Sébastien Pédron
9e96043255 Merge from trunk (r1649 to r1692).
PR:		EJABP-1

SVN Revision: 1695
2008-12-01 15:53:30 +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
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
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
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
4eaa8e19c9 Merge from trunk (r1457 to r1563).
SVN Revision: 1564
2008-09-16 14:39:57 +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
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
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
6e91399922 Convert to exmpp.
SVN Revision: 1463
2008-07-21 15:29:52 +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
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
Alexey Shchepin
8283a9faf3 * src/mod_roster.erl: Fixed "from" attribute in roster pushes
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 1213
2008-02-28 22:10:55 +00:00
Alexey Shchepin
08a4392fa9 * src/mod_roster.erl: Removed the ancient Psi roster workaround
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 1189
2008-02-14 04:51:04 +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
cd82cadd10 * applied copyright patch 2.
SVN Revision: 1112
2007-12-24 12:58:05 +00:00
Alexey Shchepin
24ff98d50d Fixed conflict
SVN Revision: 887
2007-08-24 16:18:46 +00:00
Alexey Shchepin
a8bc3a46af * src/web/ejabberd_web_admin.erl: Moved roster stuff to mod_roster*
* src/mod_roster.erl: Likewise
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 886
2007-08-24 16:15:05 +00:00