conncheck: rework the stun requests ordering per timer tick
authorFabrice Bellet <fabrice@bellet.info>
Tue, 12 May 2020 18:13:18 +0000 (20:13 +0200)
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>
Thu, 14 May 2020 02:31:54 +0000 (02:31 +0000)
commit72ccb1a23649c6e9dd956f8cae0f23cc5ac525cd
tree388978d13537af8ea10f5616086616eabaf62c0f
parent90c21bf99b050d2dc6473e93a03df0dd86d2bbca
conncheck: rework the stun requests ordering per timer tick

With this patch, we merge the two variables stun_sent and
keep_timer_going. The three functions that are a possible source of a
new stun request returns a boolean value stating if a request has been
sent.  The semantic of keep_timer_going can now be deduced from
stun_sent and from the result of priv_conn_check_stream_nominate().

The trick that makes this merge possible is to repurpose the return
value of priv_conn_check_tick_stream(), because keep_timer_going set
when the conncheck list contains in-progress pairs in this function is
redundant with the same check later in function
priv_conn_check_tick_stream_nominate().
agent/agent-priv.h
agent/conncheck.c