]> granicus.if.org Git - ejabberd/commitdiff
*** empty log message ***
authorAlexey Shchepin <alexey@process-one.net>
Wed, 8 Jan 2003 20:42:03 +0000 (20:42 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Wed, 8 Jan 2003 20:42:03 +0000 (20:42 +0000)
SVN Revision: 33

src/ejabberd_c2s.erl
src/ejabberd_s2s_in.erl
src/ejabberd_s2s_out.erl
src/ejabberd_service.erl
src/mod_vcard.erl

index 98144665c3c3686d5c03218c2a6b9e39814c5030..0d7a864d7bc2209b1a77b1c57ff2614ceb6720fa 100644 (file)
@@ -352,7 +352,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
         {ok, Text} ->
            xml_stream:send_text(XMLStreamPid, Text),
            receiver(Socket, C2SPid, XMLStreamPid);
-        {error, closed} ->
+        {error, Reason} ->
            exit(XMLStreamPid, closed),
            gen_fsm:send_event(C2SPid, closed),
            ok
@@ -610,7 +610,9 @@ roster_change(IJID, ISubscription, StateData) ->
            StateData;
        P ->
            ?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)
                and ((ISubscription == both) or (ISubscription == from)),
            Cond2 = ((ISubscription == none) or (ISubscription == to))
index 02b66dc62b3164a7732e8770310ef44f0c179c9c..6b47bc56bc8f85edcc59c7450fdc095616f5c79e 100644 (file)
@@ -346,7 +346,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
         {ok, Text} ->
            xml_stream:send_text(XMLStreamPid, Text),
            receiver(Socket, C2SPid, XMLStreamPid);
-        {error, closed} ->
+        {error, Reason} ->
            exit(XMLStreamPid, closed),
            gen_fsm:send_event(C2SPid, closed),
            ok
index 0ab41cc1fcb8ea89eada8e82566d0ba037a94b04..7e889edc02cc00e3a1cca2d9cfa41b218e78dee1 100644 (file)
@@ -357,7 +357,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
         {ok, Text} ->
            xml_stream:send_text(XMLStreamPid, Text),
            receiver(Socket, C2SPid, XMLStreamPid);
-        {error, closed} ->
+        {error, Reason} ->
            exit(XMLStreamPid, closed),
            gen_fsm:send_event(C2SPid, closed),
            ok
index b3de12faa27f1e6712c74e2ce7bac5a9274de30d..ff3b4e546b55495ad94adc2872a8452ab5a3c956 100644 (file)
@@ -261,7 +261,7 @@ receiver(Socket, C2SPid, XMLStreamPid) ->
         {ok, Text} ->
            xml_stream:send_text(XMLStreamPid, Text),
            receiver(Socket, C2SPid, XMLStreamPid);
-        {error, closed} ->
+        {error, Reason} ->
            exit(XMLStreamPid, closed),
            gen_fsm:send_event(C2SPid, closed),
            ok
index be88e9ccdfc95541a3ce685eb1bdef78dfd47848..b1312e3bc413e539b628e74970b072c8733160d3 100644 (file)
@@ -359,7 +359,7 @@ record_to_item(R) ->
 search(Data) ->
     MatchSpec = make_matchspec(Data),
     F = fun() ->
-               mnesia:match_object(MatchSpec)
+               mnesia:select(vcard_search, [{MatchSpec, [], ['$_']}])
        end,
     case mnesia:transaction(F) of
        {atomic, Rs} ->
@@ -370,19 +370,7 @@ search(Data) ->
 
 
 make_matchspec(Data) ->
-    GlobMatch = #vcard_search{user     = '_',
-                             fn       = '_',
-                             family   = '_',
-                             given    = '_',
-                             middle   = '_',
-                             nickname = '_',
-                             bday     = '_',
-                             ctry     = '_',
-                             locality = '_',
-                             email    = '_',
-                             orgname  = '_',
-                             orgunit  = '_'
-                            },
+    GlobMatch = #vcard_search{_ = '_'},
     Match = filter_fields(Data, GlobMatch),
     Match.