Module: kamailio
Branch: master
Commit: 4bd1d70c2804ee2a1d29bd911275aa241577cfc1
URL:
https://github.com/kamailio/kamailio/commit/4bd1d70c2804ee2a1d29bd911275aa2…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-11-23T11:49:36+01:00
tm: fixed condition in via_matching()
- introduced in previous commit
---
Modified: src/modules/tm/t_lookup.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4bd1d70c2804ee2a1d29bd911275aa2…
Patch:
https://github.com/kamailio/kamailio/commit/4bd1d70c2804ee2a1d29bd911275aa2…
---
diff --git a/src/modules/tm/t_lookup.c b/src/modules/tm/t_lookup.c
index 98a7bf97b9..49d02111f1 100644
--- a/src/modules/tm/t_lookup.c
+++ b/src/modules/tm/t_lookup.c
@@ -264,11 +264,11 @@ static inline int via_matching( struct via_body *inv_via,
ack_via->host.len)!=0)
return 0;
if (inv_via->port!=ack_via->port) {
- if(!(inv_via->port==0
- && (ack_via->port==SIP_PORT || ack_via->port==SIPS_PORT)))
+ if(inv_via->port==0
+ && ack_via->port!=SIP_PORT && ack_via->port!=SIPS_PORT)
return 0;
- if(!(ack_via->port==0
- && (inv_via->port==SIP_PORT || inv_via->port==SIPS_PORT)))
+ if(ack_via->port==0
+ && inv_via->port!=SIP_PORT && inv_via->port!=SIPS_PORT)
return 0;
}
if (inv_via->transport.len!=ack_via->transport.len)
@@ -279,9 +279,9 @@ static inline int via_matching( struct via_body *inv_via,
if (inv_via->port!=ack_via->port
&& (inv_via->port==0 || ack_via->port==0)) {
- /* test SIPS_PORT (5061) is used with TLS transport*/
+ /* test SIPS_PORT (5061) is used with TLS transport */
if(inv_via->port==SIPS_PORT || ack_via->port==SIPS_PORT) {
- if(ack_via->transport.len!=3
+ if(inv_via->transport.len!=3
|| memcmp(inv_via->transport.s, "TLS", 3)!=0) {
return 0;
}