summaryrefslogtreecommitdiff
path: root/addons/cdr_mysql.c
diff options
context:
space:
mode:
authorTilghman Lesher <tilghman@meg.abyt.es>2011-05-04 00:13:23 +0000
committerTilghman Lesher <tilghman@meg.abyt.es>2011-05-04 00:13:23 +0000
commitfbe3c85deef84bcc46494873bc160e1d17b156be (patch)
tree92e3a4a03c86c2165db2ae6fe8bc5ef0af9b4213 /addons/cdr_mysql.c
parented56ae3ef76950d12a6799d958b5cd16106e6420 (diff)
Merged revisions 316429 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316429 | tilghman | 2011-05-03 19:12:25 -0500 (Tue, 03 May 2011) | 7 lines Escape column names in case they contain illegal characters ('-') or reserved words. (closes issue #19063) Reported by: festr Patches: patch uploaded by festr (license 443) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons/cdr_mysql.c')
-rw-r--r--addons/cdr_mysql.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 167a5af58..60abae2d9 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -325,7 +325,7 @@ db_reconnect:
ast_str_make_space(&escape, (valsz = strlen(value)) * 2 + 1);
mysql_real_escape_string(&mysql, ast_str_buffer(escape), value, valsz);
- ast_str_append(&sql1, 0, "%s", entry->name);
+ ast_str_append(&sql1, 0, "`%s`", entry->name);
ast_str_append(&sql2, 0, "'%s'", ast_str_buffer(escape));
}
}