From 7ed586df12b8d2f6f70f21ab08bd99c71850ba6c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 19 Jan 2012 14:58:36 +0100 Subject: refactor: removing v6.1 scoping code --- runtime/cfsysline.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'runtime/cfsysline.c') diff --git a/runtime/cfsysline.c b/runtime/cfsysline.c index 870c5faf..7814e86a 100644 --- a/runtime/cfsysline.c +++ b/runtime/cfsysline.c @@ -937,25 +937,17 @@ rsRetVal processCfSysLineCommand(uchar *pCmdName, uchar **p) llCookieCmdHdlr = NULL; bWasOnceOK = 0; while((iRetLL = llGetNextElt(&pCmd->llCmdHdlrs, &llCookieCmdHdlr, (void*)&pCmdHdlr)) == RS_RET_OK) { - /* check if handler is valid in current scope */ - if(pCmdHdlr->eConfObjType == eConfObjAlways || - (bConfStrictScoping == 0 && currConfObj == eConfObjGlobal) || - pCmdHdlr->eConfObjType == currConfObj) { - /* for the time being, we ignore errors during handlers. The - * reason is that handlers are independent. An error in one - * handler does not necessarily mean that another one will - * fail, too. Later, we might add a config variable to control - * this behaviour (but I am not sure if that is really - * necessary). -- rgerhards, 2007-07-31 - */ - pHdlrP = *p; - if((iRet = cslchCallHdlr(pCmdHdlr, &pHdlrP)) == RS_RET_OK) { - bWasOnceOK = 1; - pOKp = pHdlrP; - } - } else { - errmsg.LogError(0, RS_RET_CONF_INVLD_SCOPE, "config command invalid for current scope"); - bHadScopingErr = 1; + /* for the time being, we ignore errors during handlers. The + * reason is that handlers are independent. An error in one + * handler does not necessarily mean that another one will + * fail, too. Later, we might add a config variable to control + * this behaviour (but I am not sure if that is really + * necessary). -- rgerhards, 2007-07-31 + */ + pHdlrP = *p; + if((iRet = cslchCallHdlr(pCmdHdlr, &pHdlrP)) == RS_RET_OK) { + bWasOnceOK = 1; + pOKp = pHdlrP; } } -- cgit v1.2.3