From 98abc06cf3d29965da3cb87c32ad1af8496f85b9 Mon Sep 17 00:00:00 2001 From: Scott Date: Sun, 27 Apr 2014 18:44:32 +0100 Subject: [PATCH] Check manual priority of adapter before interface weighting so that priority settings are obeyed. --- src/service.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/service.c b/src/service.c index fd765e79..7436c1c6 100644 --- a/src/service.c +++ b/src/service.c @@ -1120,15 +1120,16 @@ service_refresh_channel(service_t *t) /** - * Weight then prio? + * Priority Then Weight */ static int si_cmp(const service_instance_t *a, const service_instance_t *b) { int r; - r = a->si_weight - b->si_weight; + r = a->si_prio - b->si_prio; + if (!r) - r = a->si_prio - b->si_prio; + r = a->si_weight - b->si_weight; return r; }