anchor.diff:  %% export the ocs_simple_auth_fsm state callbacks
   -export([request/2]).
   
  +-export([radius/2]).
  +
   %% export the call backs needed for gen_fsm behaviour
   -export([init/1, handle_event/3, handle_sync_event/4, handle_info/3,
   			terminate/3, code_change/4]).
  
positive.code: 	end,
  	lists:filter(F, Attributes).
  
  -spec start_disconnect(DiscFsmSup, ExistingSessionAtt, StateData) -> Result
  	when
  		DiscFsmSup :: pid(),
  		ExistingSessionAtt :: radius_attributes:attributes(),
  		StateData :: statedata(),
  		Result :: term().
  %% @doc Start a disconnect_fsm worker.
  start_disconnect(DiscFsmSup, ExistingSessionAtt, #statedata{client_address =
  		Address} = StateData) ->
  	try
  			NAS = case {radius_attributes:find(?NasIpAddress, ExistingSessionAtt),
  								radius_attributes:find(?NasIdentifier)} of
  				{{_, IP}, {error, _}} ->
  					IP;
  				{_, {ok, ID}} ->
  					ID
  			end,
  			{ok, #client{port = ListenPort, protocol = radius, secret = Secret}}
  					= ocs:find_client(Address),
  			Subscriber = case radius_attributes:find(?UserName, ExistingSessionAtt) of
  				{ok, Username} ->
  					Username;
  				{error, not_found} ->
  					undefined
  			end,
  			AcctSessionId = case radius_attributes:find(?AcctSessionId, ExistingSessionAtt) of
  				{ok, ActSesId} ->
  					ActSesId;
  				{error, not_found} ->
  					undefined
  			end,
  			DiscArgs = [Address, NAS, Subscriber, AcctSessionId, Secret,
  					ListenPort, ExistingSessionAtt, 1],
  			StartArgs = [DiscArgs, []],
  			case supervisor:start_child(DiscFsmSup, StartArgs) of
  				{ok, DiscFsm} ->
  					link(DiscFsm),
  					{next_state, request, StateData};
  				{error, Reason} ->
  					error_logger:error_report(["Failed to initiate session disconnect function",
  							{module, ?MODULE}, {subscriber, Subscriber}, {nas, NAS},
  							{address, Address}, {session, AcctSessionId}, {error, Reason}]),
  					{next_state, request, StateData}
  			end
  	catch
  		_: Reason1 ->
  			request5(Reason1, StateData)
  	end.
  
  -spec get_balance(Buckets) ->
  		Balance when
  	Buckets :: [#bucket{}],
  	Balance :: integer().
  %% get the availabel balance form buckets
  get_balance([]) ->
  	0;
  get_balance(Buckets) ->
  	get_balance1(Buckets, 0).
  %% @hidden
  get_balance1([], Balance) ->
  	Balance;
  get_balance1([#bucket{remain_amount = RemAmnt}
  		| Tail], Balance) ->
  	get_balance1(Tail, RemAmnt + Balance).
  
negative.code: 		radius_id :: undefined | byte(),
  		req_auth :: undefined | binary(),
  		req_attr :: undefined | radius_attributes:attributes(),
  		res_attr :: undefined | radius_attributes:attributes(),
  		subscriber :: undefined | string(),
  		multisession :: undefined | boolean(),
  		app_id :: undefined | non_neg_integer(),
  