anchor.diff:      log_alert(Log, StateName, Alert),
       {Record, State} = next_record(State0),
       next_state(StateName, Record, State).
  +
  +alert_user(connection, Opts, Pid, From, Alert, Role) ->
  +    alert_user(Opts#socket_options.active, Pid, From, Alert, Role);
  +alert_user(_, _, _, From, Alert, Role) ->
  +    alert_user(From, Alert, Role).
   
   alert_user(From, Alert, Role) ->
       alert_user(false, no_pid, From, Alert, Role).
  
positive.code:     <<?BYTE(ByteN), NewBinary/binary>> = Binary,
      [ByteN | header(N-1, NewBinary)].
  
  %% tcp_closed
  send_or_reply(false, _Pid, undefined, _Data) ->
      Report = io_lib:format("SSL(debug): Unexpected Data ~p ~n",[_Data]),
      error_logger:error_report(Report),
      erlang:error({badarg, _Pid, undefined, _Data}),
      ok;
  send_or_reply(false, _Pid, From, Data) ->
      gen_fsm:reply(From, Data);
  send_or_reply(_, Pid, _From, Data) ->
      send_user(Pid, Data).
  
negative.code: handle_sync_event(close, _, _StateName, State) ->
      {stop, normal, ok, State};
  
  handle_sync_event({shutdown, How0}, _, StateName,
  		  #state{transport_cb = Transport,
  			 negotiated_version = Version,
  			 connection_states = ConnectionStates,
  			 socket = Socket} = State) ->
      case How0 of
  	How when How == write; How == both ->	    
  	    Alert = ?ALERT_REC(?WARNING, ?CLOSE_NOTIFY),
  	    {BinMsg, _} =
  		encode_alert(Alert, Version, ConnectionStates),
  	    Transport:send(Socket, BinMsg);
  	_ ->
  	    ok
      end,
      
      case Transport:shutdown(Socket, How0) of
  	ok ->
  	    {reply, ok, StateName, State};
  	Error ->
  