doubts about the functions in the unlang

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Jun 11 14:14:20 CEST 2015


> On 11 Jun 2015, at 08:12, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
> 
> 
>> On 11 Jun 2015, at 05:39, A.L.M.Buxey at lboro.ac.uk wrote:
>> 
>> Hi,
>> 
>>> int-require-by {
>>>   if (!&Acct-Session-Id) {
>>>       update reply {
>>>           Reply-Message := "Acct-Session-Id is required"
>>>       }
>>>       reject
>>>   }
>>> }
> 
> int-required-by {
> 	if ("%{xlat:%%{%{Tmp-String-0}}}" == '') {
> 		update reply {
> 			Reply-Message := 'Acct-Session-Id is required'
> 		}
> 		reject
> 	}
> }
> 
> update {
> 	Tmp-String-0 := 'Acct-Session-Id'
> }
> int-required-by

Or I guess

int-required-by {
	if ("%{xlat:%%{%{Tmp-String-0}}}" == '') {
		update reply {
			Reply-Message := "%{Tmp-String-0} is required"
		}
		reject
	}
}


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

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20150611/956b2487/attachment.sig>


More information about the Freeradius-Users mailing list