Skip to content
Snippets Groups Projects
Commit b156a291 authored by Rodrigo Ramírez Norambuena's avatar Rodrigo Ramírez Norambuena
Browse files

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
parent e711e571
No related branches found
No related tags found
No related merge requests found
......@@ -408,6 +408,7 @@ static int odbc_log(struct ast_cdr *cdr)
AST_LIST_TRAVERSE(&odbc_tables, tableptr, list) {
separator = "";
quoted = 0;
if (tableptr->quoted_identifiers != '\0'){
quoted = 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment