anchor.diff:  	    end,
       {reply, Reply, StateName, next_packet(State)};
   
  -handle_sync_event(get_print_info, _From, StateName, State) ->
  -    Reply =
  -	try
  -	    {inet:sockname(State#state.socket),
  -	     inet:peername(State#state.socket)
  -	    }
  -	of
  -	    {{ok,Local}, {ok,Remote}} -> {{Local,Remote},io_lib:format("statename=~p",[StateName])};
  -	    _ -> {{"-",0},"-"}
  -	catch
  -	    _:_ -> {{"?",0},"?"}
  -	end,
  -    {reply, Reply, StateName, State};
  -
  -handle_sync_event({connection_info, Options}, _From, StateName, State) ->
  -    Info = ssh_info(Options, State, []),
  -    {reply, Info, StateName, State};
  -
  -handle_sync_event({channel_info, ChannelId, Options}, _From, StateName,
  -		  #state{connection_state = #connection{channel_cache = Cache}} = State) ->
  -    case ssh_channel:cache_lookup(Cache, ChannelId) of
  -       #channel{} = Channel ->
  -	    Info = ssh_channel_info(Options, Channel, []),
  -	    {reply, Info, StateName, State};
  -	undefined ->
  -	    {reply, [], StateName, State}
  -    end;
  -
  -handle_sync_event({info, ChannelPid}, _From, StateName,
  -	    #state{connection_state =
  -		       #connection{channel_cache = Cache}} = State) ->
  -    Result = ssh_channel:cache_foldl(
  -	       fun(Channel, Acc) when ChannelPid == all;
  -				      Channel#channel.user == ChannelPid ->
  -		       [Channel | Acc];
  -		  (_, Acc) ->
  -		       Acc
  -	       end, [], Cache),
  -    {reply, {ok, Result}, StateName, State};
  -
   handle_sync_event({close, ChannelId}, _, StateName,
   		  #state{connection_state =
   			     #connection{channel_cache = Cache}} = State0) ->
  
positive.code: -type gen_fsm_state_return() :: {next_state, state_name(), term()} |
  				{next_state, state_name(), term(), timeout()} |
  				{stop, term(), term()}.
  
  %%====================================================================
  %% Internal application API
  
negative.code:     error_logger:error_report(Report),
      "Internal error".
  
  not_connected_filter({connection_reply, _Data}) ->
      true;
  not_connected_filter(_) ->
      false.
  
  send_replies([], State) ->
      State;
  send_replies([{connection_reply, Data} | Rest], #state{ssh_params = Ssh0} = State) ->
  