Browse Source

TT#14008 avoid confirm/unconfirm/reconfig flip-flop

Distinguish between unconfirming the learned peer address and
retriggering the kernel stream. In particular we don't want to unconfirm
the sinks every time we confirmed our own peer, as that starts an
unconfirm/reconfirm loop.

Change-Id: I1f172385aefeacbc4585729bce25fbc68f04c2bd
(cherry picked from commit ff2aed5907)
mr10.0.1
Richard Fuchs 4 years ago
parent
commit
93ecf8916e
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      daemon/media_socket.c

+ 3
- 2
daemon/media_socket.c View File

@ -64,6 +64,7 @@ struct packet_handler_ctx {
// verdicts:
int update; // true if Redis info needs to be updated
int unkernelize; // true if stream ought to be removed from kernel
int unconfirm; // forget learned peer address
int unkernelize_subscriptions; // if our peer address changed
int kernelize; // true if stream can be kernelized
int rtcp_discard; // do not forward RTCP
@ -1962,6 +1963,7 @@ static int media_packet_address_check(struct packet_handler_ctx *phc)
ilog(LOG_INFO | LOG_FLAG_LIMIT, "Peer address changed to %s%s%s",
FMT_M(endpoint_print_buf(&phc->mp.fsin)));
phc->unkernelize = 1;
phc->unconfirm = 1;
phc->update = 1;
phc->mp.stream->endpoint = phc->mp.fsin;
goto update_addr;
@ -2034,7 +2036,6 @@ static int media_packet_address_check(struct packet_handler_ctx *phc)
confirm_now:
phc->kernelize = 1;
phc->update = 1;
phc->unkernelize_subscriptions = 1;
ilog(LOG_INFO, "Confirmed peer address as %s%s%s", FMT_M(endpoint_print_buf(use_endpoint_confirm)));
@ -2406,7 +2407,7 @@ drop:
handler_ret = 0;
out:
if (phc->unkernelize) {
if (phc->unconfirm) {
stream_unconfirm(phc->mp.stream);
unconfirm_sinks(&phc->mp.stream->rtp_sinks);
unconfirm_sinks(&phc->mp.stream->rtcp_sinks);


Loading…
Cancel
Save