mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-21 14:06:57 +02:00
* src/ejabberd_auth_ldap.erl: LDAP function to get the number of
registered users is too slow (EJAB-331): set timeout in LDAP search queries (thanks to Evgeniy Khramtsov) and return the number of registered users. SVN Revision: 1280
This commit is contained in:
parent
1b13449194
commit
2af65d4f42
@ -1,3 +1,10 @@
|
|||||||
|
2008-04-08 Badlop <badlop@process-one.net>
|
||||||
|
|
||||||
|
* src/ejabberd_auth_ldap.erl: LDAP function to get the number of
|
||||||
|
registered users is too slow (EJAB-331): set timeout in LDAP
|
||||||
|
search queries (thanks to Evgeniy Khramtsov) and return the number
|
||||||
|
of registered users.
|
||||||
|
|
||||||
2008-04-07 Mickael Remond <mremond@process-one.net>
|
2008-04-07 Mickael Remond <mremond@process-one.net>
|
||||||
|
|
||||||
* doc/guide.tex: Documented the IQ discipline {queue, N}.
|
* doc/guide.tex: Documented the IQ discipline {queue, N}.
|
||||||
|
@ -86,6 +86,10 @@ handle_info(_Info, State) ->
|
|||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
%% -----
|
%% -----
|
||||||
|
|
||||||
|
|
||||||
|
-define(LDAP_SEARCH_TIMEOUT, 5). % Timeout for LDAP search queries in seconds
|
||||||
|
|
||||||
|
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
%%% API
|
%%% API
|
||||||
%%%----------------------------------------------------------------------
|
%%%----------------------------------------------------------------------
|
||||||
@ -172,8 +176,8 @@ get_vh_registered_users(Server) ->
|
|||||||
Result -> Result
|
Result -> Result
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_vh_registered_users_number(_Server) ->
|
get_vh_registered_users_number(Server) ->
|
||||||
0.
|
length(get_vh_registered_users(Server)).
|
||||||
|
|
||||||
get_password(_User, _Server) ->
|
get_password(_User, _Server) ->
|
||||||
false.
|
false.
|
||||||
@ -220,6 +224,7 @@ get_vh_registered_users_ldap(Server) ->
|
|||||||
{ok, EldapFilter} ->
|
{ok, EldapFilter} ->
|
||||||
case eldap_pool:search(Eldap_ID, [{base, State#state.base},
|
case eldap_pool:search(Eldap_ID, [{base, State#state.base},
|
||||||
{filter, EldapFilter},
|
{filter, EldapFilter},
|
||||||
|
{timeout, ?LDAP_SEARCH_TIMEOUT},
|
||||||
{attributes, SortedDNAttrs}]) of
|
{attributes, SortedDNAttrs}]) of
|
||||||
#eldap_search_result{entries = Entries} ->
|
#eldap_search_result{entries = Entries} ->
|
||||||
lists:flatmap(
|
lists:flatmap(
|
||||||
|
Loading…
Reference in New Issue
Block a user