translage.c: Fix regression when generating translation path strings.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 21 Oct 2014 18:04:43 +0000 (18:04 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 21 Oct 2014 18:04:43 +0000 (18:04 +0000)
Fix the AMI Status action read and write translation path strings from
growing for each channel in the status event list by reseting the ast
string given to ast_translate_path_to_str() to fill in the given
translation path.
........

Merged revisions 426079 from http://svn.asterisk.org/svn/asterisk/branches/13

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426080 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/translate.c

index 2778ebc..72abb59 100644 (file)
@@ -845,6 +845,7 @@ const char *ast_translate_path_to_str(struct ast_trans_pvt *p, struct ast_str **
                return "";
        }
 
+       ast_str_reset(*str);
        codec_append_name(&p->t->src_codec, str);
        while (p) {
                ast_str_append(str, 0, "->");