]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reset 'first' variable after usage.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Dec 2010 17:58:30 +0000 (17:58 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Dec 2010 17:58:30 +0000 (17:58 +0000)
(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/branches/1.8@299583 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/res_config_mysql.c

index a626ffd3eeea417d001d1df3a58ffff95d125603..93a743245dce97b4d714b9ac77ba28d698dce110 100644 (file)
@@ -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) {