summaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-25 12:52:18 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-25 12:52:18 +0200
commitaddadb75ebd22d1175c7e20d1095e35a46b71448 (patch)
tree5df935e71068204c813fc7ccc159c734f405b736 /conf.c
parentd040868f97fa92f1df31b2ac7ff835dc4f3c29be (diff)
downloadrsyslog-addadb75ebd22d1175c7e20d1095e35a46b71448.tar.gz
rsyslog-addadb75ebd22d1175c7e20d1095e35a46b71448.tar.xz
rsyslog-addadb75ebd22d1175c7e20d1095e35a46b71448.zip
bugfix: comments after actions were not properly treated.
For some actions (e.g. forwarding(, this could also lead to invalid configuration.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/conf.c b/conf.c
index e11c609f..5a53480f 100644
--- a/conf.c
+++ b/conf.c
@@ -473,28 +473,26 @@ rsRetVal cflineParseTemplateName(uchar** pp, omodStringRequest_t *pOMSR, int iEn
{
uchar *p;
uchar *tplName;
- DEFiRet;
cstr_t *pStrB;
+ DEFiRet;
ASSERT(pp != NULL);
ASSERT(*pp != NULL);
ASSERT(pOMSR != NULL);
p =*pp;
- /* a template must follow - search it and complain, if not found
- */
+ /* a template must follow - search it and complain, if not found */
skipWhiteSpace(&p);
if(*p == ';')
++p; /* eat it */
else if(*p != '\0' && *p != '#') {
errmsg.LogError(NO_ERRCODE, "invalid character in selector line - ';template' expected");
- iRet = RS_RET_ERR;
- goto finalize_it;
+ ABORT_FINALIZE(RS_RET_ERR);
}
skipWhiteSpace(&p); /* go to begin of template name */
- if(*p == '\0') {
+ if(*p == '\0' || *p == '#') {
/* no template specified, use the default */
/* TODO: check NULL ptr */
tplName = (uchar*) strdup((char*)dfltTplName);