From 768eb564c10adf142c6963df508bc90a8579d66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96man?= Date: Thu, 17 Apr 2008 20:33:02 +0000 Subject: [PATCH] Actually use the sorted array of transports --- transports.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/transports.c b/transports.c index db2a00bf..4836bbcf 100644 --- a/transports.c +++ b/transports.c @@ -275,7 +275,8 @@ transport_find(th_channel_t *ch, unsigned int weight) /* First, try all transports without stealing */ - LIST_FOREACH(t, &ch->ch_transports, tht_channel_link) { + for(i = 0; i < cnt; i++) { + t = vec[i]; if(t->tht_status == TRANSPORT_RUNNING) return t; @@ -286,7 +287,8 @@ transport_find(th_channel_t *ch, unsigned int weight) /* Ok, nothing, try again, but supply our weight and thus, try to steal transponders */ - LIST_FOREACH(t, &ch->ch_transports, tht_channel_link) { + for(i = 0; i < cnt; i++) { + t = vec[i]; if(!transport_start(t, weight)) return t; }