summaryrefslogtreecommitdiffstats
path: root/ommysql.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-30 10:22:44 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-30 10:22:44 +0000
commit207572e21775bb0755a3b71dd45267614c9e04a1 (patch)
treeddcec04c48411ce83094e46bf37ca5f5120fba87 /ommysql.c
parent6808a7e2f187760187edbd6aefe3513e2e5bb862 (diff)
downloadrsyslog-207572e21775bb0755a3b71dd45267614c9e04a1.tar.gz
rsyslog-207572e21775bb0755a3b71dd45267614c9e04a1.tar.xz
rsyslog-207572e21775bb0755a3b71dd45267614c9e04a1.zip
fixed a bug that caused ommysql to always complain about missing templates
Diffstat (limited to 'ommysql.c')
-rw-r--r--ommysql.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ommysql.c b/ommysql.c
index d786780b..ee8caab7 100644
--- a/ommysql.c
+++ b/ommysql.c
@@ -376,6 +376,10 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
* We specify that the SQL option must be present in the template.
* This is for your own protection (prevent sql injection).
*/
+ if(*p != ';')
+ --p; /* TODO: the whole parsing of the MySQL module needs to be re-thought - but this here
+ * is clean enough for the time being -- rgerhards, 2007-07-30
+ */
if((iRet = cflineParseTemplateName(&p, *ppOMSR, 0, OMSR_RQD_TPL_OPT_SQL, (uchar*) " StdSQLFmt"))
!= RS_RET_OK)
return iRet;