From d788bd1a27bd0586f496c7ab801ced5559867f54 Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Fri, 7 Dec 2007 20:57:44 +0000 Subject: [PATCH] * src/ejabberd_sm.erl: Bugfix SVN Revision: 1050 --- ChangeLog | 52 ++++++++++++++++++++++++--------------------- src/ejabberd_sm.erl | 3 ++- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 704eac836..81f75bf3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-12-07 Alexey Shchepin + + * src/ejabberd_sm.erl: Bugfix + 2007-12-07 Badlop * src/Makefile.in: Fix compilation warnings: Part 5: To fix a @@ -35,9 +39,9 @@ 2007-12-06 Badlop - * src/acl.erl and other 64 files: Remove Erlang module attribute - 'vsn' because it doesn't provide any worth feature, and it - difficults hot code update (EJAB-440) + * src/**/*.erl: Remove Erlang module attribute 'vsn' because it + doesn't provide any worth feature, and it difficults hot code + update (EJAB-440) * src/ejabberdctl.cfg.example: Explain that each connection uses two or three ports (thanks to Max Loparyev) @@ -49,7 +53,7 @@ * doc/version.tex: Likewise * doc/introduction.tex: Updated number of translated languages - + * src/web/ejabberd_web_admin.erl: Support more native acl_type on web interface (EJAB-253) @@ -63,7 +67,7 @@ Samuel Tardieu) (EJAB-412) * src/configure.ac: Likewise - * src/msgs/cs.msg: Updated (thanks to Lukáš Polívka alias + * src/msgs/cs.msg: Updated (thanks to Lukas Polivka alias Spike411) * src/mod_muc/mod_muc.erl: Catch creation of table @@ -136,7 +140,7 @@ * doc/guide.tex: Likewise.:ChangeLog 2007-12-02 Badlop - + * src/ejabberdctl.cfg.example: Bugfix in kernel poll. Added SMP option. Reorganization of options * src/ejabberdctl.template: Added SMP option @@ -155,12 +159,12 @@ * doc/ejabberd.hrl: Preparing ejabberd 2.0.0 beta release. * doc/version.tex: Likewise. - + * src/tls/Makefile.win32: Updated for latest Win32 OpenSSL library. * src/odbc_queries.erl: Added a default define value so that we - can recompile the file manually with a simple erlc command (with the - default generic value). + can recompile the file manually with a simple erlc command (with + the default generic value). 2007-12-01 Alexey Shchepin @@ -220,23 +224,23 @@ * doc/guide.tex: It should be made more clear that domain_certfile works for both s2s and c2s connections (EJAB-212). Added another example of listening ports. - + * doc/guide.tex: Update URI of ejabberd official home page, URI of ejabberd.jabber.ru, and copyright dates (EJAB-366) - * doc/introduction.tex: - * src/ejabberd.hrl: - * src/ejabberd_admin.erl: - * src/mod_irc/mod_irc.erl: - * src/mod_irc/mod_irc_connection.erl: - * src/mod_muc/mod_muc.erl: - * src/mod_muc/mod_muc_log.erl: - * src/mod_proxy65/mod_proxy65_service.erl: - * src/mod_pubsub/mod_pubsub.erl: - * src/mod_vcard.erl: - * src/mod_vcard_ldap.erl: - * src/mod_vcard_odbc.erl: - * src/msgs/*.msg: - * src/web/ejabberd_web_admin.erl: + * doc/introduction.tex: Likewise + * src/ejabberd.hrl: Likewise + * src/ejabberd_admin.erl: Likewise + * src/mod_irc/mod_irc.erl: Likewise + * src/mod_irc/mod_irc_connection.erl: Likewise + * src/mod_muc/mod_muc.erl: Likewise + * src/mod_muc/mod_muc_log.erl: Likewise + * src/mod_proxy65/mod_proxy65_service.erl: Likewise + * src/mod_pubsub/mod_pubsub.erl: Likewise + * src/mod_vcard.erl: Likewise + * src/mod_vcard_ldap.erl: Likewise + * src/mod_vcard_odbc.erl: Likewise + * src/msgs/*.msg: Updated + * src/web/ejabberd_web_admin.erl: Likewise 2007-11-27 Badlop diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index d236215ee..9dca35290 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -553,7 +553,8 @@ check_max_sessions(LUser, LServer) -> %% first one SIDs = mnesia:dirty_select( session, - [{#session{us = {LUser, LServer}, _ = '_'}, [], [[]]}]), + [{#session{sid = '$1', us = {LUser, LServer}, _ = '_'}, [], + ['$1']}]), MaxSessions = get_max_user_sessions(LUser, LServer), if length(SIDs) =< MaxSessions ->