Hello,

I'm using sec 2.6.0 and when in my rules file I try to store/restore
the contexts, the %main variable isn't recognized:

SEC (Simple Event Correlator) 2.6.0
Reading configuration from cpuavg.sec
5 rules loaded from cpuavg.sec
Stdin connected to terminal, SIGINT can't be used for changing the logging level
Creating SEC internal context 'SEC_INTERNAL_EVENT'
Creating SEC internal event 'SEC_STARTUP'
Evaluating code 'use Storable; ::context_list =
%{retrieve("/home/psimoes/contexts/cpuavg.dump")} if -e
"/home/psimoes/contexts/cpuavg.dump"; ' and setting variable '%a'
Error evaluating code 'use Storable; ::context_list =
%{retrieve("/home/psimoes/contexts/cpuavg.dump")} if -e
"/home/psimoes/contexts/cpuavg.dump"; ': Can't modify constant item in
scalar assignment at (eval 7) line 1, near "} if"
Deleting SEC internal context 'SEC_INTERNAL_EVENT'


Here's the code:
# Restore contexts
type=Single
ptype=RegExp
pattern=(SEC_STARTUP|SEC_RESTART)
context=SEC_INTERNAL_EVENT
desc=Restore contexts
action=eval %a ( use Storable; %main::context_list =
%{retrieve("/home/psimoes/contexts/cpuavg.dump")} if -e
"/home/psimoes/contexts/cpuavg.dump"; );

# Store contexts
type=Single
ptype=SubStr
pattern=SEC_SHUTDOWN
context=SEC_INTERNAL_EVENT
desc=Saving the SEC contexts
action=eval %a ( store(\%main::context_list,
"/home/psimoes/contexts/cpuavg.dump") );

This code works in sec 2.4.1.

Any help?

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to