[asterisk-commits] elguero: branch 12 r406311 - /branches/12/addons/res_config_mysql.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jan 23 16:54:28 CST 2014


Author: elguero
Date: Thu Jan 23 16:54:26 2014
New Revision: 406311

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=406311
Log:
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 patches 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)

Modified:
    branches/12/addons/res_config_mysql.c

Modified: branches/12/addons/res_config_mysql.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/addons/res_config_mysql.c?view=diff&rev=406311&r1=406310&r2=406311
==============================================================================
--- branches/12/addons/res_config_mysql.c (original)
+++ branches/12/addons/res_config_mysql.c Thu Jan 23 16:54:26 2014
@@ -613,7 +613,7 @@
 		}
 
 		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) {




More information about the asterisk-commits mailing list