using unlang to call a stored procedure

2013-05-20 Thread Alex Sharaz
Hi, I've written a mysql stored procedure that accepts 2 arguments, the nas-ip address of one of our (HP) switches and the calling station Id of a network client ( it's a MAC auth so the User-Name=Calling-Station-Id below). The procedure then queries various back end database tables to

Re: using unlang to call a stored procedure

2013-05-20 Thread Phil Mayers
On 20/05/13 16:55, Alex Sharaz wrote: In this case I've got Tmp-String-0 := %{sql:call get_vlan_id('%{NAS-IP-Address}','%{User-Name}')} get_vlan_id accepts two varchar arguments. Which, when I run radiusd -X -d /etc/freeradius gives me /etc/freeradius/sites-enabled/default[248]:

Re: using unlang to call a stored procedure

2013-05-20 Thread Alex Sharaz
On 20 May 2013, at 17:16, Phil Mayers wrote: On 20/05/13 16:55, Alex Sharaz wrote: In this case I've got Tmp-String-0 := %{sql:call get_vlan_id('%{NAS-IP-Address}','%{User-Name}')} get_vlan_id accepts two varchar arguments. Which, when I run radiusd -X -d /etc/freeradius

Re: using unlang to call a stored procedure

2013-05-20 Thread Alex Sharaz
Many thanks Phil, all sorted. Wrapping the sql: statement with an update control fixed the Unknown Action error. Haven't checked that I'm returning the correct stuff yet, but I'm past this particular problem Rgds Alex On 20 May 2013, at 17:16, Phil Mayers wrote: On 20/05/13 16:55, Alex