Commit 1d91fd8b authored by Clément Stenac's avatar Clément Stenac

* httpd.c: fixed a french string

* sap.c: use defines
parent 265de856
......@@ -2,7 +2,7 @@
* httpd.c
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
* $Id: httpd.c,v 1.20 2003/07/01 21:32:32 fenrir Exp $
* $Id: httpd.c,v 1.21 2003/07/02 18:44:27 zorglub Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
......@@ -1154,7 +1154,7 @@ static int _httpd_page_admin_get_success( httpd_file_callback_args_t *p_args,
p += sprintf( p, "<h1><center>VideoLAN Client Stream Output</center></h1>\n" );
p += sprintf( p, "<p>Success=`%s'</p>", psz_msg );
p += sprintf( p, "<a href=\"admin.html\">Retour a la page d'administration</a>\n" );
p += sprintf( p, "<a href=\"admin.html\">Back to admin page</a>\n" );
p += sprintf( p, "<hr />\n" );
p += sprintf( p, "<a href=\"http://www.videolan.org\">VideoLAN</a>\n" );
......@@ -1182,7 +1182,7 @@ static int _httpd_page_admin_get_error( httpd_file_callback_args_t *p_args,
p += sprintf( p, "<h1><center>VideoLAN Client Stream Output</center></h1>\n" );
p += sprintf( p, "<p>Error=`%s'</p>", psz_error );
p += sprintf( p, "<a href=\"admin.html\">Retour a la page d'administration</a>\n" );
p += sprintf( p, "<a href=\"admin.html\">Back to admin page</a>\n" );
p += sprintf( p, "<hr />\n" );
p += sprintf( p, "<a href=\"http://www.videolan.org\">VideoLAN</a>\n" );
......
......@@ -2,7 +2,7 @@
* sap.c : SAP interface module
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: sap.c,v 1.16 2003/06/25 21:03:16 zorglub Exp $
* $Id: sap.c,v 1.17 2003/07/02 18:44:27 zorglub Exp $
*
* Authors: Arnaud Schauly <gitan@via.ecp.fr>
* Clment Stenac <zorglub@via.ecp.fr>
......@@ -110,6 +110,8 @@ static void mfield_parse( char *psz_mfield, char **ppsz_proto,
char **ppsz_port );
static void free_sd( sess_descr_t * );
/* Detect multicast addresses */
static int ismult( char * );
/* The struct that contains sdp informations */
......@@ -138,25 +140,29 @@ struct media_descr_t {
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define SAP_ADDR_TEXT N_("SAP multicast address")
#define SAP_ADDR_LONGTEXT N_("SAP multicast address")
#define SAP_IPV4_TEXT N_("No IPv4-SAP listening")
#define SAP_IPV4_LONGTEXT N_("Set this if you do not want SAP to listen for IPv4 announces")
#define SAP_IPV6_TEXT N_("IPv6-SAP listening")
#define SAP_IPV6_LONGTEXT N_("Set this if you want SAP to listen for IPv6 announces")
#define SAP_SCOPE_TEXT N_("IPv6 SAP scope")
#define SAP_SCOPE_LONGTEXT N_("Sets the scope for IPv6 announces (default is 8)")
vlc_module_begin();
add_category_hint( N_("SAP"), NULL, VLC_TRUE );
add_string( "sap-addr", NULL, NULL,
"SAP multicast address", "SAP multicast address", VLC_TRUE );
SAP_ADDR_TEXT, SAP_ADDR_LONGTEXT, VLC_TRUE );
add_bool( "no-sap-ipv4", 0 , NULL,
"NO IPv4-SAP listening",
"Set this if you do not want SAP to listen for IPv4 announces",
VLC_TRUE);
SAP_IPV4_TEXT,SAP_IPV4_LONGTEXT, VLC_TRUE);
add_bool( "sap-ipv6", 0 , NULL,
"IPv6-SAP listening",
"Set this if you want SAP to listen for IPv6 announces",
VLC_TRUE);
SAP_IPV6_TEXT, SAP_IPV6_LONGTEXT, VLC_TRUE);
add_string( "sap-ipv6-scope", "8" , NULL,
"IPv6-SAP scope",
"Sets the scope for IPv6 announces (default is 8)",
VLC_TRUE);
SAP_SCOPE_TEXT, SAP_SCOPE_LONGTEXT, VLC_TRUE);
set_description( _("SAP interface") );
set_capability( "interface", 0 );
......@@ -745,14 +751,22 @@ static int ismult( char *psz_uri )
i_value = strtol( psz_uri, &psz_end, 0 );
/* FIXME: This is an ugly way to detect IPv6 multicast */
if( psz_uri[0] == '[') { return( VLC_TRUE ); }
/* IPv6 */
if( psz_uri[0] == '[')
{
if( strncasecmp( &psz_uri[1], "FF0" , 3) )
return( VLC_TRUE );
else
return( VLC_FALSE );
}
if( *psz_end != '.' ) { return( VLC_FALSE ); }
return( i_value < 224 ? VLC_FALSE : VLC_TRUE );
}
/*****************************************************************************
* Read: read on a file descriptor, checking b_die periodically
*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment