Skip to content
  • Fabrice Bellet's avatar
    agent: rework gathering failures on auto-generated IPs · 8f74fa48
    Fabrice Bellet authored and Olivier Crête's avatar Olivier Crête committed
    This patch reworks commit fc4d3aab "ignore gathering failures on
    auto-generated IPs", that introduces a regression in the test-fullmode
    check, when turn is on and use_loopback is off. The part of the test
    that fails is when nice_agent_gather_candidates (ragent...) should
    return false when the port range for the second component is already
    busy, line 385.
    
    In this case, agent->local_address is null, so the code path added by
    commit fc4d3aab is taken, and the function will return true, even when
    not local address has been gathered.
    
    The proper fix is to swap the inner and outer loops (on components, and
    on local addresses), and to go to error when all local addresses of a
    given component have failed, and to return false only in this case.
    8f74fa48