anchor.diff:  handle_ctrl_result({pos_compl, _}, #state{tls_upgrading_data_connection = {true, prot, NextAction},
   					  dsock = {tcp, Socket}, client = From,
   					  tls_options = TLSOptions} = State0) ->
  -     case ssl:connect(Socket, TLSOptions) of
  -	 {ok, TLSSocket} ->
  -	     State = State0#state{dsock = {ssl, TLSSocket},
  -				  tls_upgrading_data_connection = {false, undefined}},
  -	     next_action_after_tls_upgrade(NextAction, State);
  -	 {error, _} = Error ->
  -	     gen_server:reply(From,  {Error, self()}),
  -	     {stop, normal, State0#state{client = undefined,
  +    io:format('<--data ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State0]),
  +    case ssl:connect(Socket, TLSOptions) of
  +	{ok, TLSSocket} ->
  +	    State = State0#state{dsock = {ssl, TLSSocket},
  +				 tls_upgrading_data_connection = {false, undefined}},
  +	    next_action_after_tls_upgrade(NextAction, State);
  +	{error, _} = Error ->
  +	    gen_server:reply(From,  {Error, self()}),
  +	    {stop, normal, State0#state{client = undefined,
   					caller = undefined}}
  -     end;
  +    end;
   
   handle_ctrl_result({tls_upgrade, _}, #state{csock = {tcp, Socket},
   					    tls_options = TLSOptions,
   					    caller = open, client = From}
   		   = State) ->
  +    io:format('<--ctrl ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State]),
       case ssl:connect(Socket, TLSOptions) of
   	{ok, TLSSocket} ->
   	    gen_server:reply(From,  {ok, self()}),
  
positive.code: handle_info({tcp, Socket, Data},
  	    #state{dsock = {tcp,Socket},
  		   caller = {recv_file, Fd}} = State0) ->
      file_write(binary_to_list(Data), Fd),
      progress_report({binary, Data}, State0),
      State = activate_data_connection(State0),
  
negative.code: handle_info({tcp, Socket, Data}, #state{dsock = {tcp,Socket}, client = From,
  					caller = recv_chunk}
  	    = State)  ->
      io:format('L~p --data ~p ----> ~s~p~n',[?LINE,Socket,Data,State]),
      gen_server:reply(From, {ok, Data}),
      {noreply, State#state{client = undefined, data = <<>>}};
  
  handle_info({tcp, Socket, Data}, #state{dsock = {tcp,Socket}} = State0) ->
      io:format('L~p --data ~p ----> ~s~p~n',[?LINE,Socket,Data,State0]),
      State = activate_data_connection(State0),
      {noreply, State#state{data = <<(State#state.data)/binary,
  				  Data/binary>>}};
  