From f7259403281cf9ceafc76abd6c8bd6ddb411c2db Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Tue, 31 Oct 2006 21:25:20 +0000 Subject: [PATCH] let's set the seen flag early enough to actually make a difference... git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@46712 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/translate.c b/main/translate.c index 3843b99aef..d821d2ec7a 100644 --- a/main/translate.c +++ b/main/translate.c @@ -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) {