&array[n]

Arran Cudbard-Bell a.cudbardb at freeradius.org
Mon Dec 15 22:21:56 CET 2014


I think someone asked about this a while back.

As Module-Failure-Message attributes are appended to the request list, if there are multiple
errors it was previously not possible to get the most recent without using foreach.

There's now a new array access index [n] which will get the last attribute instance in the
current request.

update request {
	Module-Failure-Message := 'foo'
	Module-Failure-Message += 'bar'
	Module-Failure-Message += 'baz'
}

update reply {
	Reply-Message := &Module-Failure-Message[n]
}

Would send the most recent failure message in the reply-message.

This will be available in v3.0.6.

-Arran

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2



More information about the Freeradius-Users mailing list