[SR-Dev] git:master: tm: allow transport=tls parameter for SIPS URIs

Nils Ohlmeier nils at iptel.org
Fri May 22 05:13:43 CEST 2009


Module: sip-router
Branch: master
Commit: 83acd618e20e6ee82ed8ab1b2554ac3e496ca67c
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=83acd618e20e6ee82ed8ab1b2554ac3e496ca67c

Author: Nils Ohlmeier <nils at iptel.org>
Committer: Nils Ohlmeier <nils at iptel.org>
Date:   Fri May 22 01:23:14 2009 +0200

tm: allow transport=tls parameter for SIPS URIs

- for backward compatibility reason allow all transport parameters
  except transport=udp for SIPS URIs (which needs to be allowed as well
  for DTLS dupport :-) )

---

 modules/tm/ut.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/tm/ut.h b/modules/tm/ut.h
index 9d50f1b..436a7b8 100644
--- a/modules/tm/ut.h
+++ b/modules/tm/ut.h
@@ -123,8 +123,8 @@ inline static struct proxy_l *uri2proxy( str *uri, int proto )
 	}
 	
 	if (parsed_uri.type==SIPS_URI_T){
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
-			LOG(L_ERR, "ERROR: uri2proxy: bad transport  for sips uri: %d\n",
+		if (parsed_uri.proto==PROTO_UDP) {
+			LOG(L_ERR, "ERROR: uri2proxy: bad transport for sips uri: %d\n",
 					parsed_uri.proto);
 			return 0;
 		}else
@@ -181,8 +181,8 @@ inline static int get_uri_send_info(str* uri, str* host, unsigned short* port,
 	}
 	
 	if (parsed_uri.type==SIPS_URI_T){
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
-			LOG(L_ERR, "ERROR: get_uri_send_info: bad transport  for"
+		if (parsed_uri.proto==PROTO_UDP) {
+			LOG(L_ERR, "ERROR: get_uri_send_info: bad transport for"
 						" sips uri: %d\n", parsed_uri.proto);
 			return -1;
 		}else
@@ -254,8 +254,8 @@ inline static struct dest_info *uri2dst(struct dest_info* dst,
 	}
 	
 	if (parsed_uri.type==SIPS_URI_T){
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
-			LOG(L_ERR, "ERROR: uri2dst: bad transport  for sips uri: %d\n",
+		if (parsed_uri.proto==PROTO_UDP) {
+			LOG(L_ERR, "ERROR: uri2dst: bad transport for sips uri: %d\n",
 					parsed_uri.proto);
 			return 0;
 		}else




More information about the sr-dev mailing list