Travis_Loke_313
Jun 28, 2018Nimbostratus
Double substitution error: adder.irule:5: warning: [use curly braces to avoid double substitution]
Hi,
I'm testing this iRule on APM, but it seems to always return this error in all combination of braces I used. Jun 28 11:30:13 bigip86 warning mcpd[6129]: 01071859:4: Warning generated : /Common/adder.irule:5: warning: [use curly braces to avoid double substitution][$b]
The problem seems to be setting "c" with expression. Is there a way to solve this issue?
when ACCESS_POLICY_AGENT_EVENT { if { [ACCESS::policy agent_id] eq "adder"} { set a [ACCESS::session data get {session.logon.last.a}] set b [ACCESS::session data get {session.logon.last.b}] set c [expr $a + $b] ACCESS::session data set {session.custom.c} $c log local0. "iRule adder: $a + $b = $c" } }
Thank you.