mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/ejabberd_c2s.erl: Fixed processing of presence probe from
client SVN Revision: 177
This commit is contained in:
parent
0822a55f05
commit
9fc8e18eb3
@ -1,3 +1,8 @@
|
||||
2003-11-26 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_c2s.erl: Fixed processing of presence probe from
|
||||
client
|
||||
|
||||
2003-11-23 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/cyrsasl_digest.erl: Bugfix (thanks to Sergei Golovan)
|
||||
|
@ -879,16 +879,24 @@ get_auth_tags([], U, P, D, R) ->
|
||||
|
||||
process_presence_probe(From, To, StateData) ->
|
||||
LFrom = jlib:jid_tolower(From),
|
||||
LBFrom = setelement(3, LFrom, ""),
|
||||
case StateData#state.pres_last of
|
||||
undefined ->
|
||||
ok;
|
||||
_ ->
|
||||
Cond1 = (not StateData#state.pres_invis)
|
||||
and ?SETS:is_element(LFrom, StateData#state.pres_f)
|
||||
and (not ?SETS:is_element(LFrom, StateData#state.pres_i)),
|
||||
andalso (?SETS:is_element(LFrom, StateData#state.pres_f)
|
||||
orelse
|
||||
((LFrom /= LBFrom) andalso
|
||||
?SETS:is_element(LBFrom, StateData#state.pres_f)))
|
||||
andalso (not
|
||||
(?SETS:is_element(LFrom, StateData#state.pres_i)
|
||||
orelse
|
||||
((LFrom /= LBFrom) andalso
|
||||
?SETS:is_element(LBFrom, StateData#state.pres_i)))),
|
||||
Cond2 = StateData#state.pres_invis
|
||||
and ?SETS:is_element(LFrom, StateData#state.pres_f)
|
||||
and ?SETS:is_element(LFrom, StateData#state.pres_a),
|
||||
andalso ?SETS:is_element(LFrom, StateData#state.pres_f)
|
||||
andalso ?SETS:is_element(LFrom, StateData#state.pres_a),
|
||||
if
|
||||
Cond1 ->
|
||||
Packet = StateData#state.pres_last,
|
||||
@ -949,6 +957,8 @@ presence_update(From, Packet, StateData) ->
|
||||
NewState;
|
||||
"error" ->
|
||||
StateData;
|
||||
"probe" ->
|
||||
StateData;
|
||||
"subscribe" ->
|
||||
StateData;
|
||||
"subscribed" ->
|
||||
@ -1022,6 +1032,9 @@ presence_track(From, To, Packet, StateData) ->
|
||||
"error" ->
|
||||
ejabberd_router:route(From, To, Packet),
|
||||
StateData;
|
||||
"probe" ->
|
||||
ejabberd_router:route(From, To, Packet),
|
||||
StateData;
|
||||
_ ->
|
||||
%-ifdef(PRIVACY_SUPPORT).
|
||||
case catch mod_privacy:check_packet(
|
||||
|
Loading…
Reference in New Issue
Block a user