summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--plugins/sm_cust_bindcdr/sm_cust_bindcdr.c2
-rw-r--r--template.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3503ed69..70d7d322 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
*/
diff --git a/template.c b/template.c
index cc339653..3f6942c2 100644
--- a/template.c
+++ b/template.c
@@ -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");
}