diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2007-10-15 06:23:58 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2007-10-15 06:23:58 +0000 |
commit | 4eda5a54938140c6602a41c702340fbb7f9ac5bf (patch) | |
tree | dbb2fe93bb02e5b88e1a48d7b54c53f975b42ae8 /plugins/ommysql | |
parent | f174b83913b9527f5e17e44c1bb54dbe982f1a00 (diff) | |
download | rsyslog-4eda5a54938140c6602a41c702340fbb7f9ac5bf.tar.gz rsyslog-4eda5a54938140c6602a41c702340fbb7f9ac5bf.tar.xz rsyslog-4eda5a54938140c6602a41c702340fbb7f9ac5bf.zip |
changed ommsyql to allow for ":ommysql:" module specific action call method
instead of ">". This shall facilitate the creation of other plugins.
Diffstat (limited to 'plugins/ommysql')
-rw-r--r-- | plugins/ommysql/ommysql.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/ommysql/ommysql.c b/plugins/ommysql/ommysql.c index 477da213..8cc4f516 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 |