Module: sip-router Branch: master Commit: 1382c30da7ffd8831479affafde4d8e038a41240 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1382c30d...
Author: Juha Heinanen jh@tutpro.com Committer: Juha Heinanen jh@tutpro.com Date: Wed Jul 4 17:15:43 2012 +0300
modules/lcr: Fixed to/from_gw tests when proto parameter is 0 (ANY)
- Also, updated README regarding handling of NULL value in lcr_gw transport column.
---
modules/lcr/README | 4 ++-- modules/lcr/doc/lcr_admin.xml | 2 +- modules/lcr/lcr_mod.c | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/modules/lcr/README b/modules/lcr/README index 3676a55..178f265 100644 --- a/modules/lcr/README +++ b/modules/lcr/README @@ -268,8 +268,8 @@ Chapter 1. Admin Guide scheme, IP address, port, and transport protocol.
Valid URI scheme values are NULL = sip, 1 = sip and 2 = sips. Currently - valid transport protocol values are NULL = none, 1 = udp, 2 = tcp, 3 = - tls, and 4 = sctp. + valid transport protocol values are NULL and 0 = none, 1 = udp, 2 = + tcp, 3 = tls, and 4 = sctp.
As a side effect of gateway selection, selected gateway's tag and flags (that may contain information about the gateway and its capabilities) diff --git a/modules/lcr/doc/lcr_admin.xml b/modules/lcr/doc/lcr_admin.xml index 39aa980..d498904 100644 --- a/modules/lcr/doc/lcr_admin.xml +++ b/modules/lcr/doc/lcr_admin.xml @@ -103,7 +103,7 @@ </para> <para> Valid URI scheme values are NULL = sip, 1 = sip and 2 - = sips. Currently valid transport protocol values are NULL = + = sips. Currently valid transport protocol values are NULL and 0 = none, 1 = udp, 2 = tcp, 3 = tls, and 4 = sctp. </para> <para> diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c index 370e973..3bdcc98 100644 --- a/modules/lcr/lcr_mod.c +++ b/modules/lcr/lcr_mod.c @@ -2309,8 +2309,7 @@ static int do_from_gw(struct sip_msg* _m, unsigned int lcr_id,
/* Store tag and flags and return result */ if ((res != NULL) && - ((res->transport == transport) || - ((res->transport == PROTO_NONE) && (transport == PROTO_UDP)))) { + ((transport == PROTO_NONE) || (res->transport == transport))) { LM_DBG("request game from gw\n"); if (tag_avp_param) { val.s.s = res->tag; @@ -2499,8 +2498,7 @@ static int do_to_gw(struct sip_msg* _m, unsigned int lcr_id,
/* Return result */ if ((res != NULL) && - ((res->transport == transport) || - ((transport == PROTO_NONE) && (res->transport == PROTO_UDP)))) { + ((transport == PROTO_NONE) || (res->transport == transport))) { LM_DBG("request goes to gw\n"); return 1; } else {