mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
*** empty log message ***
SVN Revision: 33
This commit is contained in:
parent
2617433ae3
commit
e23adaae38
@ -352,7 +352,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
|
|||||||
{ok, Text} ->
|
{ok, Text} ->
|
||||||
xml_stream:send_text(XMLStreamPid, Text),
|
xml_stream:send_text(XMLStreamPid, Text),
|
||||||
receiver(Socket, C2SPid, XMLStreamPid);
|
receiver(Socket, C2SPid, XMLStreamPid);
|
||||||
{error, closed} ->
|
{error, Reason} ->
|
||||||
exit(XMLStreamPid, closed),
|
exit(XMLStreamPid, closed),
|
||||||
gen_fsm:send_event(C2SPid, closed),
|
gen_fsm:send_event(C2SPid, closed),
|
||||||
ok
|
ok
|
||||||
@ -610,7 +610,9 @@ roster_change(IJID, ISubscription, StateData) ->
|
|||||||
StateData;
|
StateData;
|
||||||
P ->
|
P ->
|
||||||
?DEBUG("roster changed for ~p~n", [StateData#state.user]),
|
?DEBUG("roster changed for ~p~n", [StateData#state.user]),
|
||||||
From = {StateData#state.user, StateData#state.server, ""},
|
From = {StateData#state.user,
|
||||||
|
StateData#state.server,
|
||||||
|
StateData#state.resource},
|
||||||
Cond1 = (not StateData#state.pres_invis)
|
Cond1 = (not StateData#state.pres_invis)
|
||||||
and ((ISubscription == both) or (ISubscription == from)),
|
and ((ISubscription == both) or (ISubscription == from)),
|
||||||
Cond2 = ((ISubscription == none) or (ISubscription == to))
|
Cond2 = ((ISubscription == none) or (ISubscription == to))
|
||||||
|
@ -346,7 +346,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
|
|||||||
{ok, Text} ->
|
{ok, Text} ->
|
||||||
xml_stream:send_text(XMLStreamPid, Text),
|
xml_stream:send_text(XMLStreamPid, Text),
|
||||||
receiver(Socket, C2SPid, XMLStreamPid);
|
receiver(Socket, C2SPid, XMLStreamPid);
|
||||||
{error, closed} ->
|
{error, Reason} ->
|
||||||
exit(XMLStreamPid, closed),
|
exit(XMLStreamPid, closed),
|
||||||
gen_fsm:send_event(C2SPid, closed),
|
gen_fsm:send_event(C2SPid, closed),
|
||||||
ok
|
ok
|
||||||
|
@ -357,7 +357,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
|
|||||||
{ok, Text} ->
|
{ok, Text} ->
|
||||||
xml_stream:send_text(XMLStreamPid, Text),
|
xml_stream:send_text(XMLStreamPid, Text),
|
||||||
receiver(Socket, C2SPid, XMLStreamPid);
|
receiver(Socket, C2SPid, XMLStreamPid);
|
||||||
{error, closed} ->
|
{error, Reason} ->
|
||||||
exit(XMLStreamPid, closed),
|
exit(XMLStreamPid, closed),
|
||||||
gen_fsm:send_event(C2SPid, closed),
|
gen_fsm:send_event(C2SPid, closed),
|
||||||
ok
|
ok
|
||||||
|
@ -261,7 +261,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
|
|||||||
{ok, Text} ->
|
{ok, Text} ->
|
||||||
xml_stream:send_text(XMLStreamPid, Text),
|
xml_stream:send_text(XMLStreamPid, Text),
|
||||||
receiver(Socket, C2SPid, XMLStreamPid);
|
receiver(Socket, C2SPid, XMLStreamPid);
|
||||||
{error, closed} ->
|
{error, Reason} ->
|
||||||
exit(XMLStreamPid, closed),
|
exit(XMLStreamPid, closed),
|
||||||
gen_fsm:send_event(C2SPid, closed),
|
gen_fsm:send_event(C2SPid, closed),
|
||||||
ok
|
ok
|
||||||
|
@ -359,7 +359,7 @@ record_to_item(R) ->
|
|||||||
search(Data) ->
|
search(Data) ->
|
||||||
MatchSpec = make_matchspec(Data),
|
MatchSpec = make_matchspec(Data),
|
||||||
F = fun() ->
|
F = fun() ->
|
||||||
mnesia:match_object(MatchSpec)
|
mnesia:select(vcard_search, [{MatchSpec, [], ['$_']}])
|
||||||
end,
|
end,
|
||||||
case mnesia:transaction(F) of
|
case mnesia:transaction(F) of
|
||||||
{atomic, Rs} ->
|
{atomic, Rs} ->
|
||||||
@ -370,19 +370,7 @@ search(Data) ->
|
|||||||
|
|
||||||
|
|
||||||
make_matchspec(Data) ->
|
make_matchspec(Data) ->
|
||||||
GlobMatch = #vcard_search{user = '_',
|
GlobMatch = #vcard_search{_ = '_'},
|
||||||
fn = '_',
|
|
||||||
family = '_',
|
|
||||||
given = '_',
|
|
||||||
middle = '_',
|
|
||||||
nickname = '_',
|
|
||||||
bday = '_',
|
|
||||||
ctry = '_',
|
|
||||||
locality = '_',
|
|
||||||
email = '_',
|
|
||||||
orgname = '_',
|
|
||||||
orgunit = '_'
|
|
||||||
},
|
|
||||||
Match = filter_fields(Data, GlobMatch),
|
Match = filter_fields(Data, GlobMatch),
|
||||||
Match.
|
Match.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user