]> granicus.if.org Git - ejabberd/commitdiff
Remove dead code for NS_VCARD iq packets from ejabberd_c2s
authorAndreas Köhler <andreas.koehler@1und1.de>
Fri, 5 Nov 2010 02:54:56 +0000 (03:54 +0100)
committerBadlop <badlop@process-one.net>
Wed, 10 Nov 2010 14:40:00 +0000 (15:40 +0100)
For EJAB-1045, the special NS_VCARD block for handling incoming vcard
iqs on behalf of clients has already been restricted to cases where the
user or resource part of the recipient is empty. But then the packets
should not have been routed to the c2s process anyway. This patch
completely removes it.

src/ejabberd_c2s.erl

index 66c6be7e9e7cf0be84f0195e9d69789b1b6ecb87..4bbc6b481c431e96e60444b100f0fef8a7c62353 100644 (file)
@@ -1246,18 +1246,6 @@ handle_info({route, From, To, Packet}, StateName, StateData) ->
            "iq" ->
                IQ = jlib:iq_query_info(Packet),
                case IQ of
-                   #iq{xmlns = ?NS_VCARD} when (To#jid.luser == "") or (To#jid.lresource == "") ->
-                       Host = StateData#state.server,
-                       case ets:lookup(sm_iqtable, {?NS_VCARD, Host}) of
-                           [{_, Module, Function, Opts}] ->
-                               gen_iq_handler:handle(Host, Module, Function, Opts,
-                                                     From, To, IQ);
-                           [] ->
-                               Err = jlib:make_error_reply(
-                                       Packet, ?ERR_FEATURE_NOT_IMPLEMENTED),
-                               ejabberd_router:route(To, From, Err)
-                       end,
-                       {false, Attrs, StateData};
                    IQ when (is_record(IQ, iq)) or (IQ == reply) ->
                        case privacy_check_packet(StateData, From, To, Packet, in) of
                            allow ->