[Asterisk-code-review] cdr adaptive odbc: Fix DNSs mixed config quote quoted identi... (asterisk[master])
Rodrigo Ramirez Norambuena
asteriskteam at digium.com
Fri Aug 5 23:42:46 CDT 2016
Rodrigo Ramirez Norambuena has uploaded a new change for review.
https://gerrit.asterisk.org/3423
Change subject: cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers
......................................................................
cdr_adaptive_odbc: Fix DNSs mixed config quote quoted_identifiers
When haved more than once DNSs config and one of their dont set
quoted_identifiers and before this is with configurated with
quoted_identifiers resulting a truncate statement for a reference null
for quote character identifier.
This patch initializes quoted flag before build SQL Query
Example config for this bugfix case in cdr_adaptive_odbc.conf file
[first]
connection=asterisk-server1
table=cdr
quoted_identifiers="
[second]
connection=asterisk-server2
table=cdr
[third]
connection=asterisk-server3
table=cdr
quoted_identifiers=`
Change-Id: Ibd95667b468e10d4a19a2b9d88b9934ec7207e1d
---
M cdr/cdr_adaptive_odbc.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/23/3423/1
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index 0da8c01..f0bcc09 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -408,6 +408,7 @@
AST_LIST_TRAVERSE(&odbc_tables, tableptr, list) {
separator = "";
+ quoted = 0;
if (tableptr->quoted_identifiers != '\0'){
quoted = 1;
}
--
To view, visit https://gerrit.asterisk.org/3423
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd95667b468e10d4a19a2b9d88b9934ec7207e1d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
More information about the asterisk-code-review
mailing list