Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/service.c b/src/service.c
- index 1898aee..3f74339 100644
- --- a/src/service.c
- +++ b/src/service.c
- @@ -821,9 +828,21 @@ service_find_instance
- }
- /* Forced */
- - TAILQ_FOREACH(si, sil, si_link)
- - if(si->si_weight < 0 && si->si_error == 0)
- - break;
- + si = NULL;
- + TAILQ_FOREACH(next, sil, si_link)
- + if(next->si_weight < 0 && next->si_error == 0) {
- + if(si == NULL) {
- + si = next;
- + } else {
- + if (next->si_prio > si->si_prio)
- + si = next;
- + }
- + }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement