[vlc-devel] [PATCH] amt: move timer disarm before 'continue'

Rémi Denis-Courmont remi at remlab.net
Wed Oct 28 20:50:22 CET 2020


Le keskiviikkona 28. lokakuuta 2020, 21.13.55 EET Natalie Landsberg a écrit :
> Addresses bug #25228. Streams would time out at 4:04 because the update
> timer would be disarmed and never rearmed again.
> 
> Move vlc_timer_disarm above 'continue' on line 742 so that the timer is
> still stopped before trying the next server, but is instead after
> confirming whether a UDP packet can be received.
> 
> ---
>  modules/access/amt.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/modules/access/amt.c b/modules/access/amt.c
> index 52bf0271ef..bc58bc971f 100644
> --- a/modules/access/amt.c
> +++ b/modules/access/amt.c
> @@ -728,10 +728,6 @@ static bool open_amt_tunnel( stream_t *p_access )
>              msg_Dbg( p_access, "Joined ASM group" );
>          }
> 
> -        /* If started, the timer must be stopped before trying the next
> server -         * in order to avoid data-race with sys->sAMT. */
> -        vlc_timer_disarm( sys->updateTimer );
> -

The comment seems to imply that the patch reintroduces a data race.

>          amt_send_mem_update( p_access, sys->relayDisco, false );
>          bool eof=false;
>          block_t *pkt;
> @@ -740,6 +736,9 @@ static bool open_amt_tunnel( stream_t *p_access )
>          if ( !(pkt = BlockAMT( p_access, &eof )) )
>          {
>              msg_Err( p_access, "Unable to receive UDP packet from AMT relay
> %s for multicast group", relay_ip ); +            /* If started, the timer
> must be stopped before trying the next server +            * in order to
> avoid data-race with sys->sAMT. */
> +            vlc_timer_disarm( sys->updateTimer );
>              continue;
>          }
>          else


-- 
Реми Дёни-Курмон
http://www.remlab.net/





More information about the vlc-devel mailing list