summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--action.c27
-rw-r--r--grammar/rainerscript.c8
-rw-r--r--runtime/rsconf.c8
3 files changed, 10 insertions, 33 deletions
diff --git a/action.c b/action.c
index ad003118..8d3239b6 100644
--- a/action.c
+++ b/action.c
@@ -2095,33 +2095,6 @@ finalize_it:
RETiRet;
}
-
-/* Process a rsyslog v6 action config object (the now-primary config method).
- * rgerhards, 2011-07-19
- */
-rsRetVal
-actionProcessCnf(struct cnfobj *o)
-{
- DEFiRet;
-#if 0 /* we need to check if we actually need this functionality -- later! */
-// This is for STAND-ALONE actions at the conf file TOP level
- struct cnfparamvals *paramvals;
-
- paramvals = nvlstGetParams(o->nvlst, &pblk, NULL);
- if(paramvals == NULL) {
- iRet = RS_RET_ERR;
- goto finalize_it;
- }
- DBGPRINTF("action param blk after actionProcessCnf:\n");
- cnfparamsPrint(&pblk, paramvals);
-
- /* now find module to activate */
-finalize_it:
-#endif
- RETiRet;
-}
-
-
/* TODO: we are not yet a real object, the ClassInit here just looks like it is..
*/
rsRetVal actionClassInit(void)
diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c
index ab07e0c4..d3e82fae 100644
--- a/grammar/rainerscript.c
+++ b/grammar/rainerscript.c
@@ -1628,7 +1628,7 @@ cnfstmtPrint(struct cnfstmt *root, int indent)
doIndent(indent); dbgprintf("STOP\n");
break;
case S_ACT:
- doIndent(indent); dbgprintf("ACTION %p (%s)\n", stmt->d.act, stmt->printable);
+ doIndent(indent); dbgprintf("ACTION %p [%s]\n", stmt->d.act, stmt->printable);
break;
case S_IF:
doIndent(indent); dbgprintf("IF\n");
@@ -1845,6 +1845,7 @@ struct cnfstmt *
cnfstmtNewAct(struct nvlst *lst)
{
struct cnfstmt* cnfstmt;
+ char namebuf[256];
if((cnfstmt = cnfstmtNew(S_ACT)) == NULL)
goto done;
if(actionNewInst(lst, &cnfstmt->d.act) != RS_RET_OK) {
@@ -1854,7 +1855,10 @@ cnfstmtNewAct(struct nvlst *lst)
cnfstmt->nodetype = S_NOP; /* disable action! */
goto done;
}
- cnfstmt->printable = (uchar*)strdup("action()");
+ snprintf(namebuf, sizeof(namebuf)-1, "action(type=\"%s\" ...)",
+ modGetName(cnfstmt->d.act->pMod));
+ namebuf[255] = '\0'; /* be on safe side */
+ cnfstmt->printable = (uchar*)strdup(namebuf);
done: return cnfstmt;
}
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index 96118538..7caa0cc5 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -360,9 +360,6 @@ void cnfDoObj(struct cnfobj *o)
case CNFOBJ_MODULE:
modulesProcessCnf(o);
break;
- case CNFOBJ_ACTION:
- actionProcessCnf(o);
- break;
case CNFOBJ_TPL:
tplProcessCnf(o);
break;
@@ -371,6 +368,10 @@ void cnfDoObj(struct cnfobj *o)
/* these types are processed at a later stage */
bChkUnuse = 0;
break;
+ default:
+ dbgprintf("cnfDoObj program error: unexpected object type %u\n",
+ o->objType);
+ break;
}
if(bChkUnuse)
nvlstChkUnused(o->nvlst);
@@ -380,7 +381,6 @@ void cnfDoObj(struct cnfobj *o)
void cnfDoScript(struct cnfstmt *script)
{
// TODO: streamline this, call directly into ruleset from grammar.y
- // TODO: BSD-Style blocks?
dbgprintf("cnf:global:script\n");
ruleset.AddScript(ruleset.GetCurrent(loadConf), script);
}