mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-02 16:37:52 +01:00
Cache negative response (EJAB-474)
SVN Revision: 1293
This commit is contained in:
parent
bb5e7353a4
commit
bd9d2cb97c
@ -1,3 +1,7 @@
|
|||||||
|
2008-04-14 Christophe Romain <christophe.romain@process-one.net>
|
||||||
|
|
||||||
|
* src/mod_caps.erl: Cache negative response (EJAB-474)
|
||||||
|
|
||||||
2008-04-11 Alexey Shchepin <alexey@process-one.net>
|
2008-04-11 Alexey Shchepin <alexey@process-one.net>
|
||||||
|
|
||||||
* src/tls/tls_drv.c: Fixed gcc signedness warnings (EJAB-447)
|
* src/tls/tls_drv.c: Fixed gcc signedness warnings (EJAB-447)
|
||||||
|
@ -250,8 +250,21 @@ handle_cast({disco_response, From, _To,
|
|||||||
?ERROR_MSG("ID '~s' matches no query", [ID])
|
?ERROR_MSG("ID '~s' matches no query", [ID])
|
||||||
end;
|
end;
|
||||||
{error, _} ->
|
{error, _} ->
|
||||||
gen_server:cast(self(), visit_feature_queries),
|
%% XXX: if we get error, we cache empty feature not to probe the client continuously
|
||||||
?DEBUG("Error IQ reponse from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
case ?DICT:find(ID, Requests) of
|
||||||
|
{ok, {Node, SubNode}} ->
|
||||||
|
Features = [],
|
||||||
|
mnesia:transaction(
|
||||||
|
fun() ->
|
||||||
|
mnesia:write(#caps_features{node_pair = {Node, SubNode},
|
||||||
|
features = Features})
|
||||||
|
end),
|
||||||
|
gen_server:cast(self(), visit_feature_queries);
|
||||||
|
error ->
|
||||||
|
?ERROR_MSG("ID '~s' matches no query", [ID])
|
||||||
|
end;
|
||||||
|
%gen_server:cast(self(), visit_feature_queries),
|
||||||
|
%?DEBUG("Error IQ reponse from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
||||||
{result, _} ->
|
{result, _} ->
|
||||||
?DEBUG("Invalid IQ contents from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
?DEBUG("Invalid IQ contents from ~s:~n~p", [jlib:jid_to_string(From), SubEls]);
|
||||||
_ ->
|
_ ->
|
||||||
|
Loading…
Reference in New Issue
Block a user