]> git.sesse.net Git - vlc/blobdiff - src/misc/netutils.c
* Fixed the BeOS compile typo.
[vlc] / src / misc / netutils.c
index fdfb8934b51e5f8cb00a251ed34f22194adf860d..67990c27a2252ab61af6f0531752258ec8b6d7ae 100644 (file)
@@ -2,7 +2,7 @@
  * netutils.c: various network functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: netutils.c,v 1.31 2001/05/28 02:38:48 sam Exp $
+ * $Id: netutils.c,v 1.34 2001/05/30 17:03:12 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Benoit Steiner <benny@via.ecp.fr>
@@ -199,7 +199,7 @@ int network_ChannelCreate( void )
     intf_ErrMsg( "error: channel changing is not yet supported under BeOS" );
     return( 1 );
 
-#elif defined( SYS_LINUX )
+#elif defined( SYS_LINUX ) || defined( WIN32 )
 /* FIXME : channels handling only work for linux */
     /* Allocate structure */
     p_main->p_channel = malloc( sizeof( input_channel_t ) );
@@ -241,7 +241,7 @@ int network_ChannelJoin( int i_channel )
     intf_ErrMsg( "network error: channels are not yet supported under BeOS" );
     return( -1 );
 
-#elif defined( WIN32 ) || defined( SYS_LINUX )
+#elif defined( SYS_LINUX ) || defined( WIN32 )
     int                 i_socket;
     int                 i_fromlen;
     struct sockaddr_in  sa_server;
@@ -290,9 +290,9 @@ int network_ChannelJoin( int i_channel )
     sa_server.sin_family = AF_INET;
     sa_server.sin_port   = htons( INPUT_CHANNEL_PORT_DEFAULT );
 #ifdef HAVE_ARPA_INET_H
-    if( !inet_aton( psz_server, &p_socket->sin_addr) )
+    inet_aton( INPUT_CHANNEL_SERVER_DEFAULT, &sa_server.sin_addr );
 #else
-    if( (sa_server.sin_addr.s_addr = inet_addr( INPUT_CHANNEL_SERVER_DEFAULT )) == -1 )
+    sa_server.sin_addr.s_addr = inet_addr( INPUT_CHANNEL_SERVER_DEFAULT );
 #endif
 
     /*
@@ -458,7 +458,7 @@ static int GetMacAddress( int i_socket, char *psz_mac )
 
     return( i_ret );
 
-#elif
+#else
     return( -1);
 
 #endif