anchor.diff:  
   -module(xmlrpc).
   -author('jocke@gleipnir.com').
  --export([call/4, call/5, call/6, call/7, call/8, new_call/7]).
  +-export([call/3, call/4, call/5, call/6, call/7, call/8, call2/7]).
   -export([start_link/1, start_link/5, start_link/6, stop/1]).
   
   -include("log.hrl").
   
  --record(header, {
  -	  %% int()
  -	  content_length,
  -	  %% close | undefined
  -	  connection
  -	 }).
  +-include("xmlrpc.hrl").
   
   %% Exported: call/{3,4,5,6,7}
   
  -call(Host, Port, URI, Payload, SslOption) when is_number(Port) -> 
  -	call(Host, Port, URI, Payload, false, 60000, "", SslOption).
  -
  -call(Socket, URI, Payload, SslOption) -> 
  -	new_call(Socket, URI, Payload, false, 60000, "", SslOption).
  -
  -call(Socket, URI, Payload, KeepAlive, Timeout, SslOption) ->
  -	new_call(Socket, URI, Payload, KeepAlive, Timeout, "", SslOption).
  -
  -call(Host, Port, URI, Payload, KeepAlive, Timeout, SslOption) when is_number(Port) ->
  -    call(Host, Port, URI, Payload, KeepAlive, Timeout, "", SslOption);
  -
  -call(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeader, SslOption) ->
  -  new_call(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeader, SslOption).
  -
  -call(Host, Port, URI, Payload, KeepAlive, Timeout, ExtraHeaders, SslOption) when is_number(Port)  ->
  -    case open_socket(Host, Port, SslOption) of
  -	{ok, Socket} -> new_call(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeaders, SslOption);
  +call(Socket, URI, Payload) ->
  +	call2(Socket, URI, Payload, false, 60000, "", [{ssl, false}, {header, false}]).
  +
  +call(Host, Port, URI, Payload, Options) when is_number(Port) -> 
  +	call(Host, Port, URI, Payload, false, 60000, "", Options);
  +
  +call(Socket, URI, Payload, KeepAlive, Timeout) ->
  +	call2(Socket, URI, Payload, KeepAlive, Timeout, "", [{ssl, false}, {header, false}]).
  +
  +call(Host, Port, URI, Payload) when is_number(Port) -> 
  +	call(Host, Port, URI, Payload, false, 60000, "", [{ssl, false}, {header, false}]);
  +	
  +call(Socket, URI, Payload, Options) -> 
  +	call2(Socket, URI, Payload, false, 60000, "", Options).
  +
  +call(Host, Port, URI, Payload, KeepAlive, Timeout) when is_number(Port) ->
  +	call(Host, Port, URI, Payload, KeepAlive, Timeout, "", [{ssl, false}, {header, false}]);
  +
  +call(Socket, URI, Payload, KeepAlive, Timeout, Options) ->
  +	call2(Socket, URI, Payload, KeepAlive, Timeout, "", Options).
  +
  +call(Host, Port, URI, Payload, KeepAlive, Timeout, Options) when is_number(Port) ->
  +    call(Host, Port, URI, Payload, KeepAlive, Timeout, "", Options);
  +
  +call(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeader, Options) ->
  +  call2(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeader, Options).
  +
  +call(Host, Port, URI, Payload, KeepAlive, Timeout, ExtraHeaders, Options) when is_number(Port)  ->
  +    case open_socket(Host, Port, Options) of
  +	{ok, Socket} -> call2(Socket, URI, Payload, KeepAlive, Timeout, ExtraHeaders, Options);
   	{error, Reason} when KeepAlive == false -> {error, Reason};
   	{error, Reason} -> {error, undefined, Reason}
       end.
  
positive.code: 	    {error, Reason};
  	{error, Reason} when KeepAlive == true,
  			     Header#header.connection == close ->
  	    comm_close(SslOption, Socket),
  	    {error, Socket, Reason};
  	{error, Reason} -> {error, Socket, Reason}
      end.
  
negative.code: 		{error, Reason} -> {error, Reason}
  	end.
  
  fetch_comm_module(Options) ->
  	case lists:keyfind(ssl, 1, Options) of
  		{ssl, true} -> ssl;
  		_ -> gen_tcp
  	end.
  
  has_header_option(Options) ->
  	case lists:keyfind(header, 1, Options) of
  		{_, true} -> true;
  		_ -> false
  	end.
  
  fetch_sets_module(Options) ->
  	case lists:keyfind(ssl, 1, Options) of
  		{ssl, true} -> ssl;
  		_ -> inet
  	end.
  
  comm_close(Options, Socket) ->
  	M = fetch_comm_module(Options),
  	apply(M, close, [ Socket ]).
  	
  parse_header(Socket, Timeout, SslOption) -> parse_header(Socket, Timeout, SslOption, #header{}).
  