anchor.diff:  			{error, Reason}
   	end.
   %% @hidden
  -update_session1(AcctSessionId, SessionIdentification, SessionLists) ->
  -	update_session2(AcctSessionId, SessionIdentification, SessionLists, []).
  -%% @hidden
  -update_session2(_AcctSessionId, _SessionIdentification, [], Acc) ->
  -	Acc;
  -update_session2(AcctSessionId, SessionIdentification, [{TS, SessionAttributes} = H | T] = S, Acc) ->
  -	case update_session3(SessionIdentification, SessionAttributes) of
  +update_session1(SessionAttributes, SessionIdentification, SessionLists) ->
  +	update_session2(SessionAttributes, SessionIdentification, SessionLists, []).
  +%% @hidden
  +update_session2(SessionAttributes, _SessionIdentification, [], Acc) ->
  +	Now = erlang:system_time(?MILLISECOND),
  +	[{Now, SessionAttributes} | Acc];
  +update_session2(SessionAttributes, SessionIdentification, [{_, Attributes} = H | T] = S, Acc) ->
  +	case update_session3(SessionIdentification, Attributes) of
   		true ->
  -			case lists:keyfind(?AcctSessionId, 1, SessionAttributes) of
  -				{_, _} ->
  -					S ++ Acc;
  -				false ->
  -					Identification = radius_attributes:store(?AcctSessionId,
  -							AcctSessionId, SessionAttributes),
  -					NewAcc = [{TS, Identification} | T],
  -					NewAcc ++ Acc
  -			end;
  +			S ++ Acc;
   		false ->
  -			update_session2(AcctSessionId, SessionIdentification, T, [H | Acc])
  +			update_session2(SessionAttributes, SessionIdentification, T, [H | Acc])
   	end.
   %% @hidden
   update_session3([], _SessionAttributes) ->
  
positive.code: 	StartArgs = [DiscArgs, []],
  	supervisor:start_child(DiscSup, StartArgs).
  
  update_session(SubscriberId, AcctSessionId, SessionIdentification) when is_list(SubscriberId) ->
  	update_session(list_to_binary(SubscriberId), AcctSessionId, SessionIdentification);
  update_session(SubscriberId, AcctSessionId, SessionIdentification) when is_binary(SubscriberId) ->
  	F = fun() ->
  			case mnesia:read(subscriber, SubscriberId, write) of
  				[#subscriber{session_attributes = SessionAttributes} = Subscriber] ->
  					case update_session1(AcctSessionId, SessionIdentification, SessionAttributes) of
  						SessionAttributes ->
  							ok;
  						NSA ->
  							mnesia:write(Subscriber#subscriber{session_attributes = NSA})
  
negative.code: 			update_session3(T, SessionAttributes)
  	end.
  
  -spec extract_session_attributes(Attributes) -> SessionAttributes
  	when
  		Attributes :: radius_attributes:attributes(),
  		SessionAttributes :: radius_attributes:attributes().
  %% @doc Extract and return RADIUS session related attributes from
  %% `Attributes'.
  %% @hidden
  extract_session_attributes(Attributes) ->
  	F = fun({K, _}) when K == ?NasIdentifier; K == ?NasIpAddress;
  				K == ?UserName; K == ?FramedIpAddress; K == ?NasPort;
  				K == ?NasPortType; K == ?CalledStationId; K == ?CallingStationId;
  				K == ?AcctSessionId; K == ?AcctMultiSessionId; K == ?NasPortId;
  				K == ?OriginatingLineInfo; K == ?FramedInterfaceId;
  				K == ?FramedIPv6Prefix ->
  			true;
  		(_) ->
  			false
  	end,
  	lists:filter(F, Attributes).
  