diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2014-05-02 00:42:09 +0400 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2014-05-02 17:42:57 +0400 |
commit | ab6774d93d44290814e367ae556ff07ac0dc0879 (patch) | |
tree | 782b157599b4b297de3f3c1121f99bc14d0df975 /src | |
parent | Optimize request processing (diff) |
Fix CSeq comparison
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_sip_registrar.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_sip_registrar.erl b/src/mod_sip_registrar.erl index 9325a1330..57c55be08 100644 --- a/src/mod_sip_registrar.erl +++ b/src/mod_sip_registrar.erl @@ -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), |