anchor.diff:      {keep_state_and_data, [{reply,From,Reply}]};
   
   handle_event({call,From}, {recv_window, ChannelId}, StateName, D) 
  -  when element(1,StateName) == connected ;
  -       element(1,StateName) == ext_info ->
  +  when ?CONNECTED(StateName) ->
       Reply = case ssh_channel:cache_lookup(cache(D), ChannelId) of
   		#channel{recv_window_size = WinSize,
   			 recv_packet_size = Packsize} ->
  
positive.code:     {keep_state_and_data, [{reply,From,Reply}]};
  
  handle_event({call,From}, {close, ChannelId}, StateName, D0) 
    when element(1,StateName) == connected ;
         element(1,StateName) == ext_info ->
      case ssh_channel:cache_lookup(cache(D0), ChannelId) of
  	#channel{remote_id = Id} = Channel ->
  	    D1 = send_msg(ssh_connection:channel_close_msg(Id), D0),
  
negative.code: handle_event({call,From},
  	     {open, ChannelPid, Type, InitialWindowSize, MaxPacketSize, Data, Timeout},
  	     StateName,
  	     D0) when ?CONNECTED(StateName) ->
      erlang:monitor(process, ChannelPid),
      {ChannelId, D1} = new_channel_id(D0),
      D2 = send_msg(ssh_connection:channel_open_msg(Type, ChannelId,
  