Actually use the sorted array of transports

This commit is contained in:
Andreas Öman 2008-04-17 20:33:02 +00:00
parent fd8fb5e76f
commit 768eb564c1

View file

@ -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;
}