]> granicus.if.org Git - ejabberd/commitdiff
Fix CSeq comparison
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Thu, 1 May 2014 20:42:09 +0000 (00:42 +0400)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 2 May 2014 13:42:57 +0000 (17:42 +0400)
src/mod_sip_registrar.erl

index 9325a13300e6dddf72c6dcbece7f99a29e445405..57c55be08a9f1aedd63f1302dbe57cc9b77d722a 100644 (file)
@@ -225,7 +225,7 @@ write_session(#sip_session{us = {U, S} = US,
        [#sip_session{bindings = Bindings}] ->
            case pop_previous_binding(SIPSocket, Bindings) of
                {ok, #binding{call_id = CallID, cseq = PrevCSeq}, _}
-                 when PrevCSeq >= CSeq ->
+                 when PrevCSeq > CSeq ->
                    {error, cseq_out_of_order};
                {ok, #binding{tref = Tref}, Bindings1} ->
                    erlang:cancel_timer(Tref),
@@ -255,7 +255,7 @@ delete_session(US, SIPSocket, CallID, CSeq) ->
        [#sip_session{bindings = Bindings}] ->
            case pop_previous_binding(SIPSocket, Bindings) of
                {ok, #binding{call_id = CallID, cseq = PrevCSeq}, _}
-                 when PrevCSeq >= CSeq ->
+                 when PrevCSeq > CSeq ->
                    {error, cseq_out_of_order};
                {ok, #binding{tref = TRef}, []} ->
                    erlang:cancel_timer(TRef),