From: Michael L. Young Date: Thu, 23 Jan 2014 22:54:26 +0000 (+0000) Subject: res_config_mysql: Fix Setting The Column Name Incorrectly X-Git-Tag: 12.1.0-rc1~3^2~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5ea048c26929a2c0087c5ddd1ed4f2f45487d3e;p=thirdparty%2Fasterisk.git res_config_mysql: Fix Setting The Column Name Incorrectly When support for a realtime sorcery module was added in revision 386731, the wrong property was accidentally used for setting the column name to be updated in the database table. This patch fixes the typo. (closes issue ASTERISK-23177) Reported by: Denis Tested by: Denis Patches: asterisk-23177-use-field-name.diff by Michael L. Young (license 5026) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@406311 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c index f9201698c9..e7bbfb07ef 100644 --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -613,7 +613,7 @@ static int update_mysql(const char *database, const char *tablename, const char } ESCAPE_STRING(buf, field->value); - ast_str_append(&sql, 0, ", `%s` = '%s'", field->value, ast_str_buffer(buf)); + ast_str_append(&sql, 0, ", `%s` = '%s'", field->name, ast_str_buffer(buf)); /* If the column length isn't long enough, give a chance to lengthen it. */ if (strncmp(column->type, "char", 4) == 0 || strncmp(column->type, "varchar", 7) == 0) {