mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-28 17:38:54 +01:00
handle_cast({disco_response, ...}, ...) now receives an #iq record:
update the code to handle this. SVN Revision: 1552
This commit is contained in:
parent
8baed08641
commit
02e6bf8759
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
* src/mod_roster.erl: Remove a debugging io:format/2.
|
* src/mod_roster.erl: Remove a debugging io:format/2.
|
||||||
|
|
||||||
|
* src/mod_caps.erl: handle_cast({disco_response, ...}, ...) now
|
||||||
|
receives an #iq record: update the code to handle this.
|
||||||
|
|
||||||
2008-08-26 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
2008-08-26 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
|
||||||
|
|
||||||
* src/jlib.erl: short_jid/1 and short_bare_jid/1 now produce a short
|
* src/jlib.erl: short_jid/1 and short_bare_jid/1 now produce a short
|
||||||
|
@ -217,10 +217,9 @@ handle_cast({note_caps, From,
|
|||||||
?ERROR_MSG("Transaction failed: ~p", [Error]),
|
?ERROR_MSG("Transaction failed: ~p", [Error]),
|
||||||
{noreply, State}
|
{noreply, State}
|
||||||
end;
|
end;
|
||||||
handle_cast({disco_response, From, _To, IQ},
|
handle_cast({disco_response, From, _To, #iq{id = ID, type = Type, payload = Payload}},
|
||||||
#state{disco_requests = Requests} = State) ->
|
#state{disco_requests = Requests} = State) ->
|
||||||
ID = exmpp_stanza:get_id(IQ),
|
case {Type, Payload} of
|
||||||
case {exmpp_iq:get_type(IQ), exmpp_iq:get_payload(IQ)} of
|
|
||||||
{result, #xmlel{name = 'query', children = Els}} ->
|
{result, #xmlel{name = 'query', children = Els}} ->
|
||||||
case ?DICT:find(ID, Requests) of
|
case ?DICT:find(ID, Requests) of
|
||||||
{ok, {Node, SubNode}} ->
|
{ok, {Node, SubNode}} ->
|
||||||
@ -255,8 +254,8 @@ handle_cast({disco_response, From, _To, IQ},
|
|||||||
end;
|
end;
|
||||||
%gen_server:cast(self(), visit_feature_queries),
|
%gen_server:cast(self(), visit_feature_queries),
|
||||||
%?DEBUG("Error IQ reponse from ~s:~n~p", [exmpp_jid:jid_to_list(From), SubEls]);
|
%?DEBUG("Error IQ reponse from ~s:~n~p", [exmpp_jid:jid_to_list(From), SubEls]);
|
||||||
{result, _} ->
|
{result, Payload} ->
|
||||||
?DEBUG("Invalid IQ contents from ~s:~n~p", [exmpp_jid:jid_to_list(From), IQ#xmlel.children]);
|
?DEBUG("Invalid IQ contents from ~s:~n~p", [exmpp_jid:jid_to_list(From), Payload]);
|
||||||
_ ->
|
_ ->
|
||||||
%% Can't do anything about errors
|
%% Can't do anything about errors
|
||||||
ok
|
ok
|
||||||
@ -287,10 +286,10 @@ handle_cast(visit_feature_queries, #state{feature_queries = FeatureQueries} = St
|
|||||||
end, [], FeatureQueries),
|
end, [], FeatureQueries),
|
||||||
{noreply, State#state{feature_queries = NewFeatureQueries}}.
|
{noreply, State#state{feature_queries = NewFeatureQueries}}.
|
||||||
|
|
||||||
handle_disco_response(From, To, IQ) ->
|
handle_disco_response(From, To, IQ_Rec) ->
|
||||||
#jid{ldomain = Host} = To,
|
#jid{ldomain = Host} = To,
|
||||||
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
|
||||||
gen_server:cast(Proc, {disco_response, From, To, IQ}).
|
gen_server:cast(Proc, {disco_response, From, To, IQ_Rec}).
|
||||||
|
|
||||||
handle_info(_Info, State) ->
|
handle_info(_Info, State) ->
|
||||||
{noreply, State}.
|
{noreply, State}.
|
||||||
|
Loading…
Reference in New Issue
Block a user