mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/ejabberd_s2s.erl: Added remove_connection/3
* src/ejabberd_s2s_out.erl: Bugfix: remove only own s2s record SVN Revision: 812
This commit is contained in:
parent
907878081d
commit
2810c2b300
@ -1,3 +1,8 @@
|
||||
2007-07-15 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_s2s.erl: Added remove_connection/3
|
||||
* src/ejabberd_s2s_out.erl: Bugfix: remove only own s2s record
|
||||
|
||||
2007-07-11 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_s2s_out.erl: Bounce packets after unregistering s2s
|
||||
|
@ -19,6 +19,7 @@
|
||||
get_key/1,
|
||||
try_register/1,
|
||||
remove_connection/1,
|
||||
remove_connection/3,
|
||||
dirty_get_connections/0,
|
||||
ctl_process/2
|
||||
]).
|
||||
@ -59,6 +60,14 @@ remove_connection(FromTo) ->
|
||||
end,
|
||||
mnesia:transaction(F).
|
||||
|
||||
remove_connection(FromTo, Pid, Key) ->
|
||||
F = fun() ->
|
||||
mnesia:delete_object(#s2s{fromto = FromTo,
|
||||
pid = Pid,
|
||||
key = Key})
|
||||
end,
|
||||
mnesia:transaction(F).
|
||||
|
||||
have_connection(FromTo) ->
|
||||
case catch mnesia:dirty_read(s2s, FromTo) of
|
||||
[_] ->
|
||||
|
@ -656,8 +656,8 @@ terminate(Reason, StateName, StateData) ->
|
||||
false ->
|
||||
ok;
|
||||
Key ->
|
||||
ejabberd_s2s:remove_connection({StateData#state.myname,
|
||||
StateData#state.server})
|
||||
ejabberd_s2s:remove_connection(
|
||||
{StateData#state.myname, StateData#state.server}, self(), Key)
|
||||
end,
|
||||
bounce_queue(StateData#state.queue, ?ERR_REMOTE_SERVER_NOT_FOUND),
|
||||
case StateData#state.socket of
|
||||
|
Loading…
Reference in New Issue
Block a user