Browse code

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 :-) )

Nils Ohlmeier authored on 21/05/2009 23:23:14
Showing 1 changed files
... ...
@@ -123,8 +123,8 @@ inline static struct proxy_l *uri2proxy( str *uri, int proto )
123 123
 	}
124 124
 	
125 125
 	if (parsed_uri.type==SIPS_URI_T){
126
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
127
-			LOG(L_ERR, "ERROR: uri2proxy: bad transport  for sips uri: %d\n",
126
+		if (parsed_uri.proto==PROTO_UDP) {
127
+			LOG(L_ERR, "ERROR: uri2proxy: bad transport for sips uri: %d\n",
128 128
 					parsed_uri.proto);
129 129
 			return 0;
130 130
 		}else
... ...
@@ -181,8 +181,8 @@ inline static int get_uri_send_info(str* uri, str* host, unsigned short* port,
181 181
 	}
182 182
 	
183 183
 	if (parsed_uri.type==SIPS_URI_T){
184
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
185
-			LOG(L_ERR, "ERROR: get_uri_send_info: bad transport  for"
184
+		if (parsed_uri.proto==PROTO_UDP) {
185
+			LOG(L_ERR, "ERROR: get_uri_send_info: bad transport for"
186 186
 						" sips uri: %d\n", parsed_uri.proto);
187 187
 			return -1;
188 188
 		}else
... ...
@@ -254,8 +254,8 @@ inline static struct dest_info *uri2dst(struct dest_info* dst,
254 254
 	}
255 255
 	
256 256
 	if (parsed_uri.type==SIPS_URI_T){
257
-		if ((parsed_uri.proto!=PROTO_TCP) && (parsed_uri.proto!=PROTO_NONE)){
258
-			LOG(L_ERR, "ERROR: uri2dst: bad transport  for sips uri: %d\n",
257
+		if (parsed_uri.proto==PROTO_UDP) {
258
+			LOG(L_ERR, "ERROR: uri2dst: bad transport for sips uri: %d\n",
259 259
 					parsed_uri.proto);
260 260
 			return 0;
261 261
 		}else