aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_auth_ldap.erl
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-12 11:55:36 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-12 11:55:36 +0300
commit6f5d99275b2c41738647dd46659ad5fd0a424827 (patch)
tree55d12cb3d244e4363dfb2f80df1d09bb98269d40 /src/ejabberd_auth_ldap.erl
parentImprove previous commit (diff)
Process unexpected messages uniformly
Diffstat (limited to 'src/ejabberd_auth_ldap.erl')
-rw-r--r--src/ejabberd_auth_ldap.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ejabberd_auth_ldap.erl b/src/ejabberd_auth_ldap.erl
index 3f5429395..4dfebddcd 100644
--- a/src/ejabberd_auth_ldap.erl
+++ b/src/ejabberd_auth_ldap.erl
@@ -61,11 +61,15 @@
dn_filter :: binary() | undefined,
dn_filter_attrs = [] :: [binary()]}).
-handle_cast(_Request, State) -> {noreply, State}.
+handle_cast(Msg, State) ->
+ ?WARNING_MSG("Unexpected cast: ~p", [Msg]),
+ {noreply, State}.
code_change(_OldVsn, State, _Extra) -> {ok, State}.
-handle_info(_Info, State) -> {noreply, State}.
+handle_info(Info, State) ->
+ ?WARNING_MSG("Unexpected info: ~p", [Info]),
+ {noreply, State}.
-define(LDAP_SEARCH_TIMEOUT, 5).
@@ -225,8 +229,9 @@ handle_call(get_state, _From, State) ->
{reply, {ok, State}, State};
handle_call(stop, _From, State) ->
{stop, normal, ok, State};
-handle_call(_Request, _From, State) ->
- {reply, bad_request, State}.
+handle_call(Request, From, State) ->
+ ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]),
+ {noreply, State}.
find_user_dn(User, State) ->
ResAttrs = result_attrs(State),