anchor.diff:  					case Amount of
   						N when N >= 0 ->
   							authorize4(Protocol, ServiceType, Service, Buckets,
  -								Price#price{amount = N}, SessionAttributes, Reserve);
  +									Price#price{amount = N}, SessionAttributes,
  +									Reserve, ReserveUnits);
   						_N ->
   							mnesia:abort(negative_amount)
   					end;
  -				Other ->
  +				_Other ->
   					mnesia:abort(table_lookup_failed)
   			end;
   		false ->
   			mnesia:abort(undefined_tariff)
   	end;
   authorize3(Protocol, ServiceType, Service,
  -		Buckets, _Address, Price, SessionAttributes, Reserve) ->
  +		Buckets, _Address, Price, SessionAttributes, Reserve, ReserveUnits) ->
   	authorize4(Protocol, ServiceType, Service,
  -			Buckets, Price, SessionAttributes, Reserve).
  +			Buckets, Price, SessionAttributes, Reserve, ReserveUnits).
   %% @hidden
   authorize4(_Protocol, ServiceType,
   		#service{session_attributes = ExistingAttr, attributes = Attr} = Service,
   		Buckets, #price{units = Units, size = UnitSize, amount = UnitPrice},
  -		SessionAttributes, Reserve) ->
  +		SessionAttributes, Reserve, ReserveUnits) ->
   	SessionId = get_session_id(SessionAttributes),
   	case update_session(Units, 0, Reserve,
   			undefined, undefined, SessionId, Buckets) of
  -		{0, Reserve, _Buckets2} ->
  +		{0, Reserve, _Buckets2} when ReserveUnits == seconds ->
   			NewAttr = radius_attributes:store(?SessionTimeout, Reserve, Attr),
   			authorize5(Service, Buckets, ServiceType, SessionAttributes, NewAttr);
  +		{0, Reserve, _Buckets2} ->
  +%			NewAttr = radius_attributes:store(?SessionTimeout, Reserve, Attr),
  +			authorize5(Service, Buckets, ServiceType, SessionAttributes, Attr);
   		{0, UnitsReserved, Buckets2} ->
   			PriceReserveUnits = (Reserve- UnitsReserved),
   			{UnitReserve, PriceReserve} = price_units(PriceReserveUnits,
  
positive.code: authorize2(radius = Protocol, ServiceType,
  		#service{attributes = Attributes} = Service, Buckets,
  		#offer{specification = ProdSpec, price = Prices}, Timestamp,
  		Address, Direction, SessionAttributes, Reserve) when (Reserve > 0)
  		and ((ProdSpec == "9") orelse (ProdSpec == "5")) ->
  	F = fun(#price{type = tariff, units = seconds}) ->
  				true;
  			(#price{type = usage, units = seconds}) ->
  
negative.code: 				true ->
  					case mnesia:read(offer, OfferId, read) of
  						[#offer{char_value_use = CharValueUse} = Offer] ->
  							F2 = fun(#char_value_use{name = "radiusReserveSessionTime",
  									values = [#char_value{value = RRST}]})
  									when is_integer(RRST) ->
  										{true, {seconds, RRST}};
  									(#char_value_use{name = "radiusReserveSessionOctets",
  											values = [#char_value{value = RRSO}]})
  											when is_integer(RRSO) ->
  										{true, {octets, RRSO}};
  									(_) ->
  										false
  							end,
  							case lists:filtermap(F2, CharValueUse) of
  								[{ReserveUnits, Reserve}] ->
  									authorize2(radius, ServiceType, Service, Buckets,
  										Offer, Timestamp, Address, Direction,
  										SessionAttributes, Reserve, ReserveUnits);
  								[] ->
  									authorize5(Service, Buckets, ServiceType,
  											SessionAttributes, Attributes)
  							end;
  