anchor.diff:  -type common_reason() ::  'econn' | 'eclosed' | term().
   -type file_write_error_reason() :: term(). % See file:write for more info
   
  -%%-define(DBG(F,A), 'n/a').
  --define(DBG(F,A), io:format(F,A)).
  +-define(DBG(F,A), 'n/a').
  +%%-define(DBG(F,A), io:format(F,A)).
   
   %%%=========================================================================
   %%%  API - CLIENT FUNCTIONS
  
positive.code: 	{ok, Socket} when  is_list(TLSOptions) ->
  	    gen_tcp:close(LSock),
  	    ?DBG('<--data ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State0]),
  	    case ssl:connect(Socket, TLSOptions) of
  		{ok, TLSSocket} ->
  		    {ok, State0#state{dsock={ssl,TLSSocket}}};
  		{error, Reason} ->
  
negative.code: %%--------------------------------------------------------------------------
  handle_ctrl_result({tls_upgrade, _}, #state{csock = {tcp, Socket},
  					    tls_options = TLSOptions,
  					    timeout = Timeout,
  					    caller = open, client = From} 
  		   = State0) ->
      ?DBG('<--ctrl ssl:connect(~p, ~p)~n~p~n',[Socket,TLSOptions,State0]),
      case ssl:connect(Socket, TLSOptions, Timeout) of
  	{ok, TLSSocket} ->
  	    State = State0#state{csock = {ssl,TLSSocket}},
  	    send_ctrl_message(State, mk_cmd("PBSZ 0", [])),
  