]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
let's set the seen flag early enough to actually make a difference...
authorKevin P. Fleming <kpfleming@digium.com>
Tue, 31 Oct 2006 21:25:20 +0000 (21:25 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Tue, 31 Oct 2006 21:25:20 +0000 (21:25 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46712 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/translate.c

index 3843b99aef8d73dfb539d00c44cfb2603e33c465..d821d2ec7af4f83d3ea30db0727483d313ad411c 100644 (file)
@@ -651,6 +651,8 @@ int __ast_register_translator(struct ast_translator *t, struct ast_module *mod)
        }
 
        if (!t->seen) {
+               t->seen = 1;
+
                if (!t->buf_size) {
                        ast_log(LOG_WARNING, "empty buf size, you need to supply one\n");
                        return -1;
@@ -691,8 +693,6 @@ int __ast_register_translator(struct ast_translator *t, struct ast_module *mod)
                        t->frameout = default_frameout;
   
                calc_cost(t, 1);
-
-               t->seen = 1;
        }
 
        if (option_verbose > 1) {