24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-28 22:52:27 +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 ->
case dict:find(CmdID, State#state.cmd_cache) of
{ok, {JID, _DeviceID}} ->
From = jlib:make_jid("", State#state.host, ""),
ejabberd_router:route(
From, JID,
{xmlelement, "message", [],
[{xmlelement, "disable",
[{"xmlns", ?NS_P1_PUSH},
{"status", integer_to_list(Status)}],
[]}]});
?ERROR_MSG("PUSH ERROR for ~p: ~p", [JID, Status]),
%From = jlib:make_jid("", State#state.host, ""),
%ejabberd_router:route(
% From, JID,
% {xmlelement, "message", [],
% [{xmlelement, "disable",
% [{"xmlns", ?NS_P1_PUSH},
% {"status", integer_to_list(Status)}],
% []}]});
ok;
error ->
?ERROR_MSG("Unknown cmd ID ~p~n", [CmdID]),
ok