Oops
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Aug 2008 23:23:56 +0000 (23:23 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 27 Aug 2008 23:23:56 +0000 (23:23 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140355 65c4cc65-6c06-0410-ace0-fbb531ad65f3

cdr/cdr_pgsql.c

index 50d4049..c6e1738 100644 (file)
@@ -266,8 +266,8 @@ static int pgsql_log(struct ast_cdr *cdr)
                }
                AST_RWLIST_UNLOCK(&psql_columns);
                LENGTHEN_BUF1(sql2->len);
-               sql->str[sql->len - 1] = ')';
-               sql2->str[sql2->len - 1] = ')';
+               sql->str[sql->used - 1] = ')';
+               sql2->str[sql2->used - 1] = ')';
                ast_str_append(&sql, 0, "%s", sql2->str);
                ast_verb(11, "[%s]\n", sql->str);