[sr-dev] git:master: core: don't attempt srv lookup for proto ws or wss

Klaus Darilion klaus.mailinglists at pernau.at
Wed Oct 2 13:27:08 CEST 2013


Isn't NAPTR/SRV lookups specified for websockets?

On 01.10.2013 23:18, Daniel-Constantin Mierla wrote:
> Module: sip-router
> Branch: master
> Commit: 1c74725dc14fc40d9b553950e212241821351878
> URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1c74725dc14fc40d9b553950e212241821351878
>
> Author: Daniel-Constantin Mierla <miconda at gmail.com>
> Committer: Daniel-Constantin Mierla <miconda at gmail.com>
> Date:   Tue Oct  1 23:18:07 2013 +0200
>
> core: don't attempt srv lookup for proto ws or wss
>
> ---
>
>   dns_cache.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/dns_cache.c b/dns_cache.c
> index 917b43e..2d7278c 100644
> --- a/dns_cache.c
> +++ b/dns_cache.c
> @@ -2670,6 +2670,10 @@ struct hostent* dns_srv_sip_resolvehost(str* name, unsigned short* port,
>   	}else{
>   		srv_proto=PROTO_UDP;
>   	}
> +	if(srv_proto==PROTO_WS || srv_proto==PROTO_WS) {
> +		/* no srv records for web sockets */
> +		return 0;
> +	}
>   	/* try SRV if no port specified (draft-ietf-sip-srv-06) */
>   	if ((port)&&(*port==0)){
>   		*port=(srv_proto==PROTO_TLS)?SIPS_PORT:SIP_PORT; /* just in case we
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>



More information about the sr-dev mailing list