From: Tilghman Lesher Date: Fri, 24 Dec 2010 17:59:23 +0000 (+0000) Subject: Merged revisions 299583 via svnmerge from X-Git-Tag: 11.0.0-beta1~2035 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f79916fa88d48c920155a4117e8ad46785da74c;p=thirdparty%2Fasterisk.git Merged revisions 299583 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r299583 | tilghman | 2010-12-24 11:58:30 -0600 (Fri, 24 Dec 2010) | 7 lines Reset 'first' variable after usage. (closes issue #18525) Reported by: makoto Patches: res-config-mysql-update2.patch uploaded by makoto (license 38) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299584 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c index a626ffd3ee..93a743245d 100644 --- a/addons/res_config_mysql.c +++ b/addons/res_config_mysql.c @@ -745,6 +745,7 @@ static int update2_mysql(const char *database, const char *tablename, va_list ap ESCAPE_STRING(buf, newval); ast_str_append(&sql, 0, "%s %s = '%s'", first ? "" : ",", newparam, ast_str_buffer(buf)); + first = 0; /* 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) {