summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-08-09 08:18:10 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-08-09 08:18:10 +0000
commitf18be4c0c540012dc8d6c6c917a0a06043d218d4 (patch)
treefc99de6a580ce90507368822ce47fa4545e98813
parent2d0175a1ec7e41cfb923ef175c6b48d094f532a7 (diff)
downloadrsyslog-f18be4c0c540012dc8d6c6c917a0a06043d218d4.tar.gz
rsyslog-f18be4c0c540012dc8d6c6c917a0a06043d218d4.tar.xz
rsyslog-f18be4c0c540012dc8d6c6c917a0a06043d218d4.zip
some text and code cleanup in cflineParseTemplate() to match the changed
design of selector handling
-rw-r--r--syslogd.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/syslogd.c b/syslogd.c
index 137eff50..b74bdb89 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -4836,15 +4836,13 @@ rsRetVal addAction(action_t **ppAction, modInfo_t *pMod, void *pModData, omodStr
if(pAction->iNumTpls > 0) {
/* we first need to create the template pointer array */
if((pAction->ppTpl = calloc(pAction->iNumTpls, sizeof(struct template *))) == NULL) {
- iRet = RS_RET_OUT_OF_MEMORY;
glblHadMemShortage = 1;
- goto finalize_it;
+ ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
}
/* and now the array for doAction() message pointers */
if((pAction->ppMsgs = calloc(pAction->iNumTpls, sizeof(uchar *))) == NULL) {
- iRet = RS_RET_OUT_OF_MEMORY;
glblHadMemShortage = 1;
- goto finalize_it;
+ ABORT_FINALIZE(RS_RET_OUT_OF_MEMORY);
}
}
@@ -4856,24 +4854,22 @@ rsRetVal addAction(action_t **ppAction, modInfo_t *pMod, void *pModData, omodStr
*/
if((pAction->ppTpl[i] = tplFind((char*)pTplName, strlen((char*)pTplName))) == NULL) {
snprintf(errMsg, sizeof(errMsg) / sizeof(char),
- " Could not find template '%s' - selector line disabled\n",
+ " Could not find template '%s' - action disabled\n",
pTplName);
errno = 0;
logerror(errMsg);
- iRet = RS_RET_NOT_FOUND;
- goto finalize_it;
+ ABORT_FINALIZE(RS_RET_NOT_FOUND);
}
/* check required template options */
if( (iTplOpts & OMSR_RQD_TPL_OPT_SQL)
&& (pAction->ppTpl[i]->optFormatForSQL == 0)) {
errno = 0;
- logerror("Selector disabled. To use this action, you have to specify "
+ logerror("Action disabled. To use this action, you have to specify "
"the SQL or stdSQL option in your template!\n");
- iRet = RS_RET_RQD_TPLOPT_MISSING;
- goto finalize_it;
+ ABORT_FINALIZE(RS_RET_RQD_TPLOPT_MISSING);
}
- dbgprintf("template: '%s' assgined\n", pTplName);
+ dbgprintf("template: '%s' assigned\n", pTplName);
}
pAction->pMod = pMod;