anchor.diff:  do_close_callouts(S, [Id]) ->
     Sock = get_socket(S, Id),
     case Sock#socket.tcp_state of
  -    close_wait -> 
  +    close_wait ->
         ?APPLY(sent_fin, [Id]),
         ?SET(Id, tcp_state, last_ack);
  -    established -> 
  +    established ->
         ?APPLY(sent_fin, [Id]),
         ?SET(Id, tcp_state, fin_wait_1);
       _ ->
  
positive.code:       false
    end.
  
  close_adapt(S, [_, Id]) -> 
    case get_socket(S, Id) of
      #socket{socket = Socket} ->
        [Socket, Id];
  
negative.code:             lists:member(Sock#socket.tcp_state, TcpStates) ];
  sockets_in_state(S, TcpState) ->
    sockets_in_state(S, [TcpState]).
  
  
  get_socket(S, Id) ->
    lists:keyfind(Id, #socket.id, S#state.sockets).
  