]> git.sesse.net Git - vlc/blobdiff - src/stream_output/sap.c
Simplify shutdown() portability
[vlc] / src / stream_output / sap.c
index b632298a1eb91d45495c1f7d068d10cad9e82439..6616cad667b6725bffbd7d45b3a4351af5c00741 100644 (file)
@@ -380,7 +380,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
         p_address->i_wfd = net_ConnectUDP( VLC_OBJECT(p_sap), psz_addr, SAP_PORT, 255 );
         if( p_address->i_wfd != -1 )
         {
-            net_StopRecv( p_address->i_wfd );
+            shutdown( p_address->i_wfd, SHUT_RD );
             p_address->origlen = sizeof (p_address->orig);
             getsockname (p_address->i_wfd, (struct sockaddr *)&p_address->orig,
                          &p_address->origlen);
@@ -390,7 +390,7 @@ static int announce_SAPAnnounceAdd( sap_handler_t *p_sap,
         {
             p_address->i_rfd = net_ListenUDP1( (vlc_object_t*)p_sap, psz_addr, SAP_PORT );
             if( p_address->i_rfd != -1 )
-                net_StopSend( p_address->i_rfd );
+                shutdown( p_address->i_rfd, SHUT_WR );
             p_address->i_buff = 0;
             p_address->b_enabled = VLC_TRUE;
             p_address->b_ready = VLC_FALSE;