diff options
author | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-12 11:55:36 +0300 |
---|---|---|
committer | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-07-12 11:55:36 +0300 |
commit | 6f5d99275b2c41738647dd46659ad5fd0a424827 (patch) | |
tree | 55d12cb3d244e4363dfb2f80df1d09bb98269d40 /src/mod_caps.erl | |
parent | Improve previous commit (diff) |
Process unexpected messages uniformly
Diffstat (limited to 'src/mod_caps.erl')
-rw-r--r-- | src/mod_caps.erl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mod_caps.erl b/src/mod_caps.erl index ca1269194..05f28a5a2 100644 --- a/src/mod_caps.erl +++ b/src/mod_caps.erl @@ -288,10 +288,13 @@ init([Host, Opts]) -> handle_call(stop, _From, State) -> {stop, normal, ok, State}; -handle_call(_Req, _From, State) -> - {reply, {error, badarg}, State}. +handle_call(Request, From, State) -> + ?WARNING_MSG("Unexpected call from ~p: ~p", [From, Request]), + {noreply, State}. -handle_cast(_Msg, State) -> {noreply, State}. +handle_cast(Msg, State) -> + ?WARNING_MSG("Unexpected cast: ~p", [Msg]), + {noreply, State}. handle_info({iq_reply, IQReply, {Host, From, To, Caps, SubNodes}}, State) -> feature_response(IQReply, Host, From, To, Caps, SubNodes), |