[vlc-commits] [Git][videolan/vlc][master] 2 commits: amt: remove unneeded code regarding stSvrAddr

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Sep 13 08:46:59 UTC 2021



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
ef4d8cee by Natalie Landsberg at 2021-09-13T07:58:47+00:00
amt: remove unneeded code regarding stSvrAddr

- - - - -
1ea6175f by Natalie Landsberg at 2021-09-13T07:58:47+00:00
amt: properly arm/disarm IGMP timer without causing data race

- - - - -


1 changed file:

- modules/access/amt.c


Changes:

=====================================
modules/access/amt.c
=====================================
@@ -744,6 +744,11 @@ static bool open_amt_tunnel( stream_t *p_access )
         {
             block_Release( pkt );
             msg_Dbg( p_access, "Got UDP packet from multicast group via AMT relay %s, continuing...", relay_ip );
+
+            /* Arm IGMP timer once we've confirmed we are getting packets */
+            vlc_timer_schedule( sys->updateTimer, false,
+                        VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ), VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ) );
+
             break;   /* found an active server sending UDP packets, so exit loop */
         }
     }
@@ -881,20 +886,6 @@ static int amt_sockets_init( stream_t *p_access )
         goto error;
     }
 
-    struct sockaddr_in stSvrAddr =
-    {
-        .sin_family = AF_INET,
-        .sin_port = htons( 9124 ),
-    };
-
-    res = inet_pton( AF_INET, LOCAL_LOOPBACK, &stSvrAddr.sin_addr );
-    if( res != 1 )
-    {
-        msg_Err( p_access, "Could not convert loopback address" );
-        goto error;
-    }
-    /* TODO: stSvrAddr is unused ? */
-
     return 0;
 
 error:
@@ -1244,10 +1235,6 @@ static bool amt_rcv_relay_mem_query( stream_t *p_access )
     shift++; assert( shift < RELAY_QUERY_MSG_LEN);
     memcpy( &sys->relay_igmp_query.nSrc, &pkt[shift], 2 );
 
-    /* Arms the timer for a single shot: cf. amt_update_timer_cb comment */
-    vlc_timer_schedule( sys->updateTimer, false,
-                        VLC_TICK_FROM_SEC( sys->relay_igmp_query.qqic ), 0 );
-
     return true;
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/77c4f15f84483922642357890fdf87041186af7c...1ea6175f72d765f0fc5aeb0b844f1bff820d0a0b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/77c4f15f84483922642357890fdf87041186af7c...1ea6175f72d765f0fc5aeb0b844f1bff820d0a0b
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list