anchor.diff:  %% Returns : ok
   %%--------------------------------------------------------------------
   test() ->
  +    Testing = true,
  +    NotTesting = false,
   
       %% test remove_tls_destinations(SRVList)
       %%--------------------------------------------------------------------
  
positive.code:     end.
  
  %%--------------------------------------------------------------------
  %% Function: host_port_to_dstlist(Proto, InHost, InPort, URI)
  %%           host_port_to_dstlist(Proto, InHost, InPort, URI,
  %%                                SSLNames)
  %%           Proto    = atom(), tcp | udp | tls
  %%           Host     = string()
  %%           Port     = integer() | none
  %%           URI      = sipurl record() to put in the created sipdst
  %%                      records
  %%           SSLNames = list() of string(), SSL certname(s) to expect
  %% Descrip.: Resolves a hostname and returns a list of sipdst
  %%           records of the protocol requested.
  %%           InPort should either be an integer, or the atom 'none'
  
negative.code: %%           UDP or have to do TCP only.
  %% Returns : list() of sipdst record() | {error, Reason}
  %%--------------------------------------------------------------------
  url_to_dstlist(URL, ApproxMsgSize) when is_record(URL, sipurl), is_integer(ApproxMsgSize) ->
      url_to_dstlist(URL, ApproxMsgSize, URL).
  
  url_to_dstlist(URL, ApproxMsgSize, ReqURI) when is_record(URL, sipurl), is_integer(ApproxMsgSize),
  						is_record(ReqURI, sipurl) ->
      url_to_dstlist(URL, ApproxMsgSize, ReqURI, false).
  
  url_to_dstlist(URL, ApproxMsgSize, ReqURI, Test) when is_record(URL, sipurl), is_integer(ApproxMsgSize),
  						      is_record(ReqURI, sipurl), is_boolean(Test) ->
      case url_param:find(URL#sipurl.param_pairs, "maddr") of
  	[MAddr] ->
  	    %% RFC3261 #16.5 (Determining Request Targets) says that we MUST use maddr if
  	    %% it is set. We do that carefully by checking that it is usable and falling
  	    %% back to non-maddr routing if it is not.
  	    logger:log(debug, "url_to_dstlist: URL has maddr parameter, trying to make use of it"),
  	    MAddrURL = sipurl:set([{host, MAddr}], URL),
  	    case url_to_dstlist2(MAddrURL, ApproxMsgSize, ReqURI, Test) of
  		{error, Reason} ->
  		    logger:log(normal, "Warning: Unusable 'maddr' parameter in URI ~p, ignoring : ~p",
  			       [sipurl:print(URL), Reason]),
  		    url_to_dstlist2(URL, ApproxMsgSize, ReqURI, Test);
  		L when is_list(L) ->
  		    L
  	    end;
  	_ ->
  	    url_to_dstlist2(URL, ApproxMsgSize, ReqURI, Test)
      end.
  
  %%--------------------------------------------------------------------
  %% Function: url_to_dstlist2(URL, ApproxMsgSize, ReqURI, Test)
  %%           URL           = sipurl record(), the destination we
  %%                           should resolve
  %%           ApproxMsgSize = integer()
  %%           ReqURI_in     = sipurl record(), the Request-URI to use
  %%                           when sending a request to this transport-
  %%                           layer destination
  %%           Test          = bool(), testing or not?
  %% Descrip.: Make a list of sipdst records from an URL. We need the
  %%           approximate message size to determine if we can use
  %%           UDP or have to do TCP only.
  %% Returns : list() of sipdst record() | {error, Reason}
  %%--------------------------------------------------------------------
  url_to_dstlist2(URL, ApproxMsgSize, ReqURI_in, Test) when is_record(URL, sipurl), is_integer(ApproxMsgSize),
                                                            is_record(ReqURI_in, sipurl) ->
      DstList = url_to_dstlist3(URL, ApproxMsgSize, ReqURI_in, Test),
  
      %% For SIPS URI, we MUST remove any destination that is not TLS or known to be
      %% protected through some TLS equivalent mechanism (like IPsec). We should never
      %% end up with any non-TLS destinations for a SIPS URL, but we play it safe here.
      case (URL#sipurl.proto == "sips") of
  	true ->
  	    remove_non_tls_destinations(DstList);
  	false ->
  	    DstList
      end.
  
  url_to_dstlist3(URL, ApproxMsgSize, ReqURI_in, Test) when is_record(URL, sipurl), is_integer(ApproxMsgSize),
  							  is_record(ReqURI_in, sipurl) ->
      %% Upgrade ReqURI to SIPS if URL is SIPS
      ReqURI =
  	case {URL#sipurl.proto, ReqURI_in#sipurl.proto} of
  	    {"sips", "sip"} -> sipurl:set([{proto, "sips"}], ReqURI_in);
  	    {"sips", "sips"} -> ReqURI_in;
  	    {"sips", _} ->
  		Msg = io_lib:format("Can't upgrade unknown protocol ~p to SIPS", [ReqURI_in#sipurl.proto]),
  		erlang:error({error, lists:flatten(Msg)});
  	    _ ->
  		ReqURI_in
  	end,
  
      Host = URL#sipurl.host,
      %% Check if URL host is either IPv4 or IPv6 address.
      %% Note: inet_parse:address/1 is not a supported Erlang/OTP function
  