Re: [Simple-evcorr-users] persistence of using action variables in action list?

2015-10-06 Thread David Lang
On Tue, 6 Oct 2015, Bond Masuda wrote: > Let's say I have messages like: > > msg=A > msg=B > ... > > > and my rule is: > > type=Single > ptype=regexp > pattern=^msg=(.*)$ > action= assign %msg $1; \ > create EVENT_%msg 30 ( logonly %msg expired ) > > > Does the action list for when the

Re: [Simple-evcorr-users] persistence of using action variables in action list?

2015-10-06 Thread Risto Vaarandi
The action list variables (like %msg in your example) are global and can be modified by any rule. Thus, when action list variable is substituted, the value you will see might be assigned by another rule in another rule file. Also, action list variables are substituted immediately before the action

[Simple-evcorr-users] persistence of using action variables in action list?

2015-10-06 Thread Bond Masuda
Let's say I have messages like: msg=A msg=B ... and my rule is: type=Single ptype=regexp pattern=^msg=(.*)$ action= assign %msg $1; \ create EVENT_%msg 30 ( logonly %msg expired ) Does the action list for when the context EVENT_%msg expires, get saved somewhere when the create

Re: [Simple-evcorr-users] persistence of using action variables in action list?

2015-10-06 Thread Bond Masuda
On 10/06/2015 01:18 PM, Risto Vaarandi wrote: > The action list variables (like %msg in your example) are global and > can be modified by any rule. Thus, when action list variable is > substituted, the value you will see might be assigned by another rule > in another rule file. Also, action list

[Simple-evcorr-users] is there something like a switch statement or best alternative?

2015-10-06 Thread Bond Masuda
Hi, I need to do something like this: lcall %result %input -> ( sub { ... } ) ; \ switch %result \ case 'x': ( ) \ case 'y': ( ) \ case 'z': ( ) right now, I'm implementing this like this: lcall %result %input -> ( sub {...} ); \ if %result ( \ eval %is_x ( \ if(

Re: [Simple-evcorr-users] is there something like a switch statement or best alternative?

2015-10-06 Thread Risto Vaarandi
...at this point, sec supports only few basic branching statements (such as if..else) in action list, and there is no support for switch-like actions. Therefore, switches would have to be implemented in terms of multiple if-actions like you have done. However, some of your Perl statements can be