anchor.diff:  					element_s = ElementS},
   				{next_state, commit, NewStateData, ?TIMEOUT};
   			{error, _Reason} ->
  -				EapPacket = #eap_packet{code = failure,
  -						type = ?PWD, identifier = NewEapID},
  -				send_response(EapPacket, ?AccessReject,
  +				EapPacket1 = #eap_packet{code = failure,
  +						type = ?PWD, identifier = EapID},
  +				send_response(EapPacket1, ?AccessReject,
   					RadiusID, [], RequestAuthenticator, Secret, RadiusFsm),
   				{stop, {shutdown, SessionID}, StateData}
   		end
   	catch
   		_:_ ->
  -			radius:response(RadiusFsm, {error, ignore}),
  +			EapPacket2 = #eap_packet{code = failure, identifier = EapID},
  +			send_response(EapPacket2, ?AccessReject,
  +					RadiusID, [], RequestAuthenticator, Secret, RadiusFsm),
   			{stop, {shutdown, SessionID}, StateData}
   	end.
   
  
positive.code: %%
  commit(timeout, #statedata{session_id = SessionID} = StateData)->
  	{stop, {shutdown, SessionID}, 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),
  		#eap_packet{code = response, type = ?PWD,
  				identifier = EapID, data = Data} = EapPacket,
  		EapHeader = ocs_eap_codec:eap_pwd(Data),
  		#eap_pwd{pwd_exch = commit, data = BodyData} = EapHeader,
  		Body = ocs_eap_codec:eap_pwd_commit(BodyData),
  
negative.code: 		commit1(RadiusFsm, AccessRequest, BodyData, NewStateData)
  	catch
  		_:_ ->
  			EapPacket2 = #eap_packet{code = failure, identifier = EapID},
  			send_response(EapPacket2, ?AccessReject,
  					RadiusID, [], RequestAuthenticator, Secret, RadiusFsm),
  			{stop, {shutdown, SessionID}, StateData}
  	end.
  %% @hidden
  