]> git.sesse.net Git - vlc/commitdiff
* Fixed the vlcs communication for real now.
authorSam Hocevar <sam@videolan.org>
Mon, 12 Nov 2001 23:56:53 +0000 (23:56 +0000)
committerSam Hocevar <sam@videolan.org>
Mon, 12 Nov 2001 23:56:53 +0000 (23:56 +0000)
src/misc/netutils.c

index 5b1281e5a9d702a9baabe9429e0d1897b0ecac58..2753b43a83c183f31c4a18918fef202faf7702d4 100644 (file)
@@ -2,7 +2,7 @@
  * netutils.c: various network functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.c,v 1.43 2001/11/12 22:42:56 sam Exp $
+ * $Id: netutils.c,v 1.44 2001/11/12 23:56:53 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
@@ -295,6 +295,16 @@ int network_ChannelJoin( int i_channel )
         return -1;
     }
 
+    i_dummy = 1;
+    if( setsockopt( i_fd, SOL_SOCKET, SO_REUSEADDR,
+                    (void *) &i_dummy, sizeof( i_dummy ) ) == -1 )
+    {
+        intf_ErrMsg( "network error: can't SO_REUSEADDR vlcs socket (%s)",
+                     strerror(errno));
+        close( i_fd );
+        return -1;
+    }
+
     /* Getting information about the channel server */
     psz_vlcs = main_GetPszVariable( INPUT_CHANNEL_SERVER_VAR,
                                     INPUT_CHANNEL_SERVER_DEFAULT );