summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-03-29 12:14:38 +0100
committerMichael Biebl <biebl@debian.org>2008-03-29 12:14:38 +0100
commit8a0b3535fa5eb747cf28cee9c3b281a2fe00c6b4 (patch)
tree6afb3b638c3e9676c1854b6294acc67c26fdc90c /plugins
parent4d85b3abea17def3a88653d3678c4deb848355af (diff)
downloadrsyslog-8a0b3535fa5eb747cf28cee9c3b281a2fe00c6b4.tar.gz
Imported Upstream version 1.19.10upstream/1.19.10
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ommysql/ommysql.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c
index 477da21..8cc4f51 100644
--- a/plugins/ommysql/ommysql.c
+++ b/plugins/ommysql/ommysql.c
@@ -222,8 +222,19 @@ BEGINparseSelectorAct
int iMySQLPropErr = 0;
CODESTARTparseSelectorAct
CODE_STD_STRING_REQUESTparseSelectorAct(1)
- /* first check if this config line is actually for us */
- if(*p != '>') {
+ /* first check if this config line is actually for us
+ * The first test [*p == '>'] can be skipped if a module shall only
+ * support the newer slection syntax [:modname:]. This is in fact
+ * recommended for new modules. Please note that over time this part
+ * will be handled by rsyslogd itself, but for the time being it is
+ * a good compromise to do it at the module level.
+ * rgerhards, 2007-10-15
+ */
+ if(*p == '>') {
+ p++; /* eat '>' '*/
+ } else if(!strncmp((char*) p, ":ommysql:", sizeof(":ommysql:") - 1)) {
+ p += sizeof(":ommysql:"); /* eat indicator sequence */
+ } else {
ABORT_FINALIZE(RS_RET_CONFLINE_UNPROCESSED);
}
@@ -231,7 +242,6 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
if((iRet = createInstance(&pData)) != RS_RET_OK)
goto finalize_it;
- p++; /* eat '>' '*/
/* rger 2004-10-28: added support for MySQL
* >server,dbname,userid,password