From 77b5459c59b89bcad2d3f86002c540ba124ec959 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Mon, 6 Dec 2004 21:53:57 +0000 Subject: [PATCH] Minor translation performance improvement (bug #2987, not that patch though) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4393 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- translate.c | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/translate.c b/translate.c index 2bbda14da1..0fd8f0951b 100755 --- a/translate.c +++ b/translate.c @@ -3,9 +3,9 @@ * * Translate via the use of pseudo channels * - * Copyright (C) 1999, Mark Spencer + * Copyright (C) 1999-2004, Digium, Inc. * - * Mark Spencer + * Mark Spencer * * This program is free software, distributed under the terms of * the GNU General Public License @@ -442,33 +442,40 @@ int ast_translator_best_choice(int *dst, int *srcs) int bestdst=0; int cur = 1; int besttime=999999999; - ast_mutex_lock(&list_lock); - for (y=0;y -1) { *srcs = best; *dst = bestdst; best = 0; } - ast_mutex_unlock(&list_lock); return best; }