summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Ramírez Norambuena <a@rodrigoramirez.com>2016-08-05 23:06:53 -0400
committerRodrigo Ramirez Norambuena <a@rodrigoramirez.com>2016-08-09 17:12:32 -0500
commit9ce71b6f9eca63fcb9b56c010665b6b3de4997ae (patch)
treed08a352fae4ea8c6ead7a5b3faceafec6a1990db
parent00a0101f2a409e19d26885e8d63d53a64a20a5f1 (diff)
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
-rw-r--r--cdr/cdr_adaptive_odbc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index 0da8c0142..f0bcc0962 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -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;
}