[asterisk-commits] cdr adaptive odbc: Fix DNSs mixed config quote quoted identi... (asterisk[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 11 18:24:10 CDT 2016


Joshua Colp has submitted this change and it was merged.

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(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Mark Michelson: Looks good to me, approved
  Joshua Colp: Verified



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: merged
Gerrit-Change-Id: Ibd95667b468e10d4a19a2b9d88b9934ec7207e1d
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>



More information about the asterisk-commits mailing list