agent: Accept duplicated ports if no other option
authorOlivier Crête <olivier.crete@collabora.com>
Tue, 23 Jun 2020 21:32:39 +0000 (17:32 -0400)
committerOlivier Crête <olivier.crete@collabora.com>
Wed, 22 Jul 2020 00:03:09 +0000 (20:03 -0400)
commit8fe72dce88d511d8c770033e196fd283317261b1
treed9723ae1d99efab7a02336aca7794d00149ff092
parent0b3d9f346867409e7b1b5646bd63fe3bdfaff772
agent: Accept duplicated ports if no other option

Commit a04fa4d492 introduced a new feature to try to have a different port for every
local candidate, even if they are on different interfaces. This breaks setups where the
application really wants a specific port and sets a range of exactly 1 port or a very small range.
In that case, if we can't find non-duplicated ports, then we just go around again and skip that check,
but only if both ports are in the same stream and component. Otherwise, we fail the whole component!
agent/agent.c
agent/discovery.c
agent/discovery.h
tests/meson.build
tests/test-set-port-range.c [new file with mode: 0644]