SHARE
TWEET

Untitled

a guest Aug 20th, 2016 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/src/service.c b/src/service.c
  2. index 1898aee..3f74339 100644
  3. --- a/src/service.c
  4. +++ b/src/service.c
  5. @@ -821,9 +828,21 @@ service_find_instance
  6.      }
  7.  
  8.    /* Forced */
  9. -  TAILQ_FOREACH(si, sil, si_link)
  10. -    if(si->si_weight < 0 && si->si_error == 0)
  11. -      break;
  12. +  si = NULL;
  13. +  TAILQ_FOREACH(next, sil, si_link)
  14. +    if(next->si_weight < 0 && next->si_error == 0) {
  15. +      if(si == NULL) {
  16. +        si = next;
  17. +      } else {
  18. +        if (next->si_prio > si->si_prio)
  19. +          si = next;
  20. +      }
  21. +    }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top