anchor.diff:  	catch
   		_:_ ->
   			radius:response(RadiusFsm, {error, ignore}),
  -			{next_state, wait_for_id, StateData, ?TIMEOUT}
  -	end.
  -
  --spec wait_for_commit(Event :: timeout | term(), StateData :: #statedata{}) ->
  +			{stop, {shutdown, SessionID}, StateData}
  +	end.
  +
  +-spec commit(Event :: timeout | term(), StateData :: #statedata{}) ->
   	Result :: {next_state, NextStateName :: atom(), NewStateData :: #statedata{}}
   		| {next_state, NextStateName :: atom(), NewStateData :: #statedata{},
   		Timeout :: non_neg_integer() | infinity}
   		| {next_state, NextStateName :: atom(), NewStateData :: #statedata{}, hibernate}
   		| {stop, Reason :: normal | term(), NewStateData :: #statedata{}}.
   %% @doc Handle events sent with {@link //stdlib/gen_fsm:send_event/2.
  -%%		gen_fsm:send_event/2} in the <b>wait_for_commit</b> state.
  +%%		gen_fsm:send_event/2} in the <b>commit</b> state.
   %% @@see //stdlib/gen_fsm:StateName/2
   %% @private
   %%
  -wait_for_commit(timeout, #statedata{session_id = SessionID} = StateData)->
  +commit(timeout, #statedata{session_id = SessionID} = StateData)->
   	{stop, {shutdown, SessionID}, StateData};
  -wait_for_commit({#radius{attributes = Attributes} = AccessRequest, RadiusFsm},
  -		#statedata{eap_id = EapID} = StateData) ->
  +commit({#radius{attributes = Attributes} = AccessRequest, RadiusFsm},
  +		#statedata{eap_id = EapID, session_id = SessionID} = StateData) ->
   	try 
  -		EAPMessage = radius_attributes:fetch(?EAPMessage, Attributes),
  -		EapPacket = ocs_eap_codec:eap_packet(EAPMessage),
  +		EapMessage = radius_attributes:fetch(?EAPMessage, Attributes),
  +		EapPacket = ocs_eap_codec:eap_packet(EapMessage),
   		#eap_packet{code = response, type = ?PWD,
   				identifier = EapID, data = Data} = EapPacket,
   		EapHeader = ocs_eap_codec:eap_pwd(Data),
  
positive.code: 	ExpectedSize = size(<<ElementS/binary, ScalarS/binary>>),
  	case size(BodyData) of 
  		ExpectedSize ->
  			wait_for_commit2(RadiusFsm, AccessRequest, StateData);
  		_ ->
  			send_response(failure, EapID, <<>>, ?AccessReject,
  					RadiusID, [], RequestAuthenticator, Secret, RadiusFsm),
  			{stop, {shutdown, SessionID}, StateData}
  	end.
  %% @hidden
  wait_for_commit2(RadiusFsm, #radius{id = RadiusID,
  		authenticator = RequestAuthenticator} = AccessRequest,
  		#statedata{element_p = ElementP, scalar_p = ScalarP,
  		scalar_s = ScalarS, element_s = ElementS, secret = Secret,
  
negative.code: init([Address, Port, RadiusFsm, Secret, SessionID,
  		#radius{code = ?AccessRequest, id = ID,
  		authenticator = Authenticator, attributes = Attributes}] = _Args) ->
  	{ok, Hostname} = inet:gethostname(),
  	StateData = #statedata{address = Address, port = Port,
  			radius_fsm = RadiusFsm, secret = Secret, session_id = SessionID,
  			server_id = list_to_binary(Hostname), radius_id = ID,
  			req_auth = Authenticator, req_attr = Attributes},
  	process_flag(trap_exit, true),
  	{ok, identity, StateData, 0}.
  
  -spec identity(Event :: timeout | term(), StateData :: #statedata{}) ->
  	Result :: {next_state, NextStateName :: atom(), NewStateData :: #statedata{}}
  		| {next_state, NextStateName :: atom(), NewStateData :: #statedata{},
  		Timeout :: non_neg_integer() | infinity}
  