24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-07-02 23:06:21 +02:00

Do not disable push on send error

This commit is contained in:
Alexey Shchepin 2010-09-13 06:22:14 +03:00 committed by Christophe Romain
parent e6be70943f
commit 0d8aacb3e7

View File

@ -198,14 +198,16 @@ handle_info({ssl, Socket, Packet}, State)
<<8, Status, CmdID:32>> when Status /= 0 -> <<8, Status, CmdID:32>> when Status /= 0 ->
case dict:find(CmdID, State#state.cmd_cache) of case dict:find(CmdID, State#state.cmd_cache) of
{ok, {JID, _DeviceID}} -> {ok, {JID, _DeviceID}} ->
From = jlib:make_jid("", State#state.host, ""), ?ERROR_MSG("PUSH ERROR for ~p: ~p", [JID, Status]),
ejabberd_router:route( %From = jlib:make_jid("", State#state.host, ""),
From, JID, %ejabberd_router:route(
{xmlelement, "message", [], % From, JID,
[{xmlelement, "disable", % {xmlelement, "message", [],
[{"xmlns", ?NS_P1_PUSH}, % [{xmlelement, "disable",
{"status", integer_to_list(Status)}], % [{"xmlns", ?NS_P1_PUSH},
[]}]}); % {"status", integer_to_list(Status)}],
% []}]});
ok;
error -> error ->
?ERROR_MSG("Unknown cmd ID ~p~n", [CmdID]), ?ERROR_MSG("Unknown cmd ID ~p~n", [CmdID]),
ok ok