X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Faccess%2Fudp.c;h=3be691f39c68babaeb61cdbf7ce1524d6227d71b;hb=5658c1d96012ec697d4a8f0930111ab9c9a6c9f4;hp=307383e13964604f7f4518855045c746748ac36b;hpb=f0426503977d3729de2bc3d1504314e93b405622;p=vlc diff --git a/plugins/access/udp.c b/plugins/access/udp.c index 307383e139..3be691f39c 100644 --- a/plugins/access/udp.c +++ b/plugins/access/udp.c @@ -2,7 +2,7 @@ * udp.c: raw UDP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: udp.c,v 1.1 2002/03/01 00:33:18 massiot Exp $ + * $Id: udp.c,v 1.2 2002/03/04 23:56:37 massiot Exp $ * * Authors: Christophe Massiot * @@ -107,6 +107,15 @@ static int UDPOpen( input_thread_t * p_input ) int i_bind_port = 0, i_server_port = 0; network_socket_t socket_desc; + if( config_GetIntVariable( INPUT_IPV4_VAR ) ) + { + psz_network = "ipv4"; + } + if( config_GetIntVariable( INPUT_IPV6_VAR ) ) + { + psz_network = "ipv6"; + } + if( p_input->psz_access != NULL ) { /* Find out which shortcut was used */ @@ -130,6 +139,14 @@ static int UDPOpen( input_thread_t * p_input ) while( *psz_parser && *psz_parser != ':' && *psz_parser != '@' ) { + if( *psz_parser == '[' ) + { + /* IPv6 address */ + while( *psz_parser && *psz_parser != ']' ) + { + psz_parser++; + } + } psz_parser++; } @@ -150,7 +167,8 @@ static int UDPOpen( input_thread_t * p_input ) if( *psz_parser == '@' ) { /* Found bind address or bind port */ - *psz_parser = '\0'; /* Terminate server port or name if necessary */ psz_parser++; + *psz_parser = '\0'; /* Terminate server port or name if necessary */ + psz_parser++; if( *psz_parser && *psz_parser != ':' ) { @@ -159,6 +177,14 @@ static int UDPOpen( input_thread_t * p_input ) while( *psz_parser && *psz_parser != ':' ) { + if( *psz_parser == '[' ) + { + /* IPv6 address */ + while( *psz_parser && *psz_parser != ']' ) + { + psz_parser++; + } + } psz_parser++; } }