anchor.diff:  	    #state{dsock = {Trpt,Socket},
   		   caller = {recv_file, Fd}} = State0) when Trpt==tcp;Trpt==ssl ->    
       ?DBG('L~p --data ~p ----> ~s~p~n',[?LINE,Socket,Data,State0]),
  -    file_write(binary_to_list(Data), Fd),
  +    ok = file_write(binary_to_list(Data), Fd),
       progress_report({binary, Data}, State0),
       State = activate_data_connection(State0),
       {noreply, State};
  
positive.code:     ftp_progress:stop(ProgressPid);
  progress_report({binary, Data}, #state{progress = ProgressPid}) ->
      ftp_progress:report(ProgressPid, {transfer_size, size(Data)});
  progress_report(Report,  #state{progress = ProgressPid}) ->
      ftp_progress:report(ProgressPid, Report).
  
  
  
negative.code: socket_type({ssl,_Socket}) -> ssl.
  
  activate_data_connection(#state{dsock = Socket} = State) ->
      ok = activate_connection(Socket),
      State.
  
  activate_connection({tcp, Socket}) -> inet:setopts(Socket, [{active, once}]);
  