]> granicus.if.org Git - ejabberd/commitdiff
No need to handle IQ requests other than Get and Set
authorBadlop <badlop@process-one.net>
Thu, 22 Apr 2010 18:19:42 +0000 (20:19 +0200)
committerBadlop <badlop@process-one.net>
Thu, 22 Apr 2010 18:19:42 +0000 (20:19 +0200)
src/mod_sic.erl

index e487539cdc03fb3b6c988512d6082b939415152d..08f356496ab9984e06ed9dcc52dedfd038de46db 100644 (file)
@@ -57,10 +57,7 @@ process_local_iq(#jid{user = User, server = Server, resource = Resource}, _To,
     get_ip({User, Server, Resource}, IQ);
 
 process_local_iq(_From, _To, #iq{type = 'set', sub_el = SubEl} = IQ) ->
-    IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]};
-
-process_local_iq(_From, _To, #iq{sub_el = SubEl} = IQ) ->
-    IQ#iq{type = error, sub_el = [SubEl, ?ERR_UNEXPECTED_REQUEST]}.
+    IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]}.
 
 
 process_sm_iq(#jid{user = User, server = Server, resource = Resource},
@@ -72,11 +69,7 @@ process_sm_iq(_From, _To, #iq{type = 'get', sub_el = SubEl} = IQ) ->
     IQ#iq{type = error, sub_el = [SubEl, ?ERR_FORBIDDEN]};
 
 process_sm_iq(_From, _To, #iq{type = 'set', sub_el = SubEl} = IQ) ->
-    IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]};
-
-process_sm_iq(_From, _To, #iq{sub_el = SubEl} = IQ) ->
-    IQ#iq{type = error, sub_el = [SubEl, ?ERR_UNEXPECTED_REQUEST]}.
-
+    IQ#iq{type = error, sub_el = [SubEl, ?ERR_NOT_ALLOWED]}.
 
 get_ip({User, Server, Resource},
        #iq{sub_el = {xmlelement, Name, Attrs, _} = SubEl} = IQ) ->