diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-21 10:34:43 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-03-21 10:34:43 +0100 |
commit | 41d79b8fead00f85614547606b0c1117f3efa04e (patch) | |
tree | 9440f1fd9d193ce988dbded12e8be159dac56764 | |
parent | f82f810ca8db889e18dcedabcfe9f8a149ffabc6 (diff) | |
download | rsyslog-41d79b8fead00f85614547606b0c1117f3efa04e.tar.gz rsyslog-41d79b8fead00f85614547606b0c1117f3efa04e.tar.xz rsyslog-41d79b8fead00f85614547606b0c1117f3efa04e.zip |
bugfix: strgen could not be used together with database outputs
because the sql/stdsql option could not be specified. This has been
solved by permitting the strgen to include the opton inside its name.
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=195
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | plugins/sm_cust_bindcdr/sm_cust_bindcdr.c | 2 | ||||
-rw-r--r-- | template.c | 4 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,11 @@ --------------------------------------------------------------------------- Version 5.7.10 [V5-BETA] (rgerhards), 2011-03-?? +- new sample plugin for a strgen to generate sql statement consumable + by a database plugin +- bugfix: strgen could not be used together with database outputs + because the sql/stdsql option could not be specified. This has been + solved by permitting the strgen to include the opton inside its name. + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=195 --------------------------------------------------------------------------- Version 5.7.9 [V5-BETA] (rgerhards), 2011-03-16 - improved testbench diff --git a/plugins/sm_cust_bindcdr/sm_cust_bindcdr.c b/plugins/sm_cust_bindcdr/sm_cust_bindcdr.c index 5ea7e653..d1634252 100644 --- a/plugins/sm_cust_bindcdr/sm_cust_bindcdr.c +++ b/plugins/sm_cust_bindcdr/sm_cust_bindcdr.c @@ -49,7 +49,7 @@ MODULE_TYPE_STRGEN MODULE_TYPE_NOKEEP -STRGEN_NAME("Custom_BindCDR") +STRGEN_NAME("Custom_BindCDR,sql") /* internal structures */ @@ -880,10 +880,10 @@ tplAddTplMod(struct template *pTpl, uchar** ppRestOfConfLine) * regular syntax were used, and it make sure the strgen postively * acknowledged implementing the option. -- rgerhards, 2011-03-21 */ - if(lenMod > 6 && !strcasecmp((char*) szMod + lenMod - 4, ",stdsql")) { + if(lenMod > 6 && !strcasecmp((char*) szMod + lenMod - 7, ",stdsql")) { pTpl->optFormatForSQL = 2; DBGPRINTF("strgen suports the stdsql option\n"); - } else if(lenMod > 3 && !strcasecmp((char*) szMod+ lenMod - 7, ",sql")) { + } else if(lenMod > 3 && !strcasecmp((char*) szMod+ lenMod - 4, ",sql")) { pTpl->optFormatForSQL = 1; DBGPRINTF("strgen suports the sql option\n"); } |