summaryrefslogtreecommitdiffstats
path: root/template.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2005-09-23 09:10:28 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2005-09-23 09:10:28 +0000
commit303642578686951cd4af4433a9ddecffcca60aff (patch)
treeabd2dc72a7f4a228a20226009c5ba57ec31bf473 /template.c
parentf75772231a0e3d0dee046cee23993a4dbc066939 (diff)
downloadrsyslog-303642578686951cd4af4433a9ddecffcca60aff.tar.gz
rsyslog-303642578686951cd4af4433a9ddecffcca60aff.tar.xz
rsyslog-303642578686951cd4af4433a9ddecffcca60aff.zip
fixed a problem with MySQL field escapes
Diffstat (limited to 'template.c')
-rw-r--r--template.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/template.c b/template.c
index 2104d368..41e70b01 100644
--- a/template.c
+++ b/template.c
@@ -468,7 +468,7 @@ struct template *tplAddLine(char* pName, char** ppRestOfConfLine)
++p;
if(*p != ',')
- break; /*return(pTpl);*/
+ break;
++p; /* eat ',' */
while(isspace(*p))/* skip whitespace */
@@ -489,7 +489,9 @@ struct template *tplAddLine(char* pName, char** ppRestOfConfLine)
/* as of now, the no form is nonsense... but I do include
* it anyhow... ;) rgerhards 2004-11-22
*/
- if(!strcmp(optBuf, "sql")) {
+ if(!strcmp(optBuf, "stdsql")) {
+ pTpl->optFormatForSQL = 2;
+ } else if(!strcmp(optBuf, "sql")) {
pTpl->optFormatForSQL = 1;
} else if(!strcmp(optBuf, "nosql")) {
pTpl->optFormatForSQL = 0;
@@ -580,8 +582,10 @@ void tplPrintList(void)
pTpl = tplRoot;
while(pTpl != NULL) {
dprintf("Template: Name='%s' ", pTpl->pszName == NULL? "NULL" : pTpl->pszName);
- if(pTpl->optFormatForSQL)
- dprintf("[SQL-Format] ");
+ if(pTpl->optFormatForSQL == 1)
+ dprintf("[SQL-Format (MySQL)] ");
+ else if(pTpl->optFormatForSQL == 2)
+ dprintf("[SQL-Format (standard SQL)] ");
dprintf("\n");
pTpe = pTpl->pEntryRoot;
while(pTpe != NULL) {