25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

* src/mod_offline_odbc.erl: Bugfix

SVN Revision: 920
This commit is contained in:
Alexey Shchepin 2007-09-04 22:12:33 +00:00
parent 43fe376d67
commit ef57d79093
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2007-09-05 Alexey Shchepin <alexey@process-one.net>
* src/mod_offline_odbc.erl: Bugfix
2007-09-04 Mickael Remond <mremond@process-one.net>
* src/mod_register.erl: update ejabberd commands to support

View File

@ -57,13 +57,13 @@ init(Host, MaxOfflineMsgs)
loop(Host, MaxOfflineMsgs) ->
receive
#offline_msg{user=Username} = Msg ->
Msgs = receive_all(Username, [Msg]),
#offline_msg{user = User} = Msg ->
Msgs = receive_all(User, [Msg]),
Len = length(Msgs),
%% Only count existing messages if needed:
Count = if MaxOfflineMsgs =/= infinity ->
Len + count_offline_messages(Username, Host);
Len + count_offline_messages(User, Host);
true -> 0
end,
if