X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fconfig%2Fchain.c;h=db78ab718bff5da956ac5e3ddb13f0278c6645a3;hb=132030acbbe9d9d69bed8e1382515a0060e9bf45;hp=ebb8a80634d11f3fbfb1359f5bf8d32c1d35827f;hpb=99fab9089e9e1709d9c3a4bc5ced0c137ac59134;p=vlc diff --git a/src/config/chain.c b/src/config/chain.c index ebb8a80634..db78ab718b 100644 --- a/src/config/chain.c +++ b/src/config/chain.c @@ -31,7 +31,7 @@ # include "config.h" #endif -#include +#include #include "libvlc.h" #include "vlc_interface.h" @@ -120,7 +120,7 @@ char *config_ChainCreate( char **ppsz_name, config_chain_t **pp_cfg, const char /* fprintf( stderr, "name=%s - rest=%s\n", psz_name, p ); */ if( p == psz_name ) { - fprintf( stderr, "invalid options (empty)" ); + fprintf( stderr, "config_ChainCreate: invalid options (empty) \n" ); break; } @@ -131,7 +131,7 @@ char *config_ChainCreate( char **ppsz_name, config_chain_t **pp_cfg, const char if( *p == '=' || *p == '{' ) { const char *end; - vlc_bool_t b_keep_brackets = (*p == '{'); + bool b_keep_brackets = (*p == '{'); if( *p == '=' ) p++; @@ -252,8 +252,8 @@ void __config_ChainParse( vlc_object_t *p_this, const char *psz_prefix, for(; cfg; cfg = cfg->p_next ) { vlc_value_t val; - vlc_bool_t b_yes = VLC_TRUE; - vlc_bool_t b_once = VLC_FALSE; + bool b_yes = true; + bool b_once = false; module_config_t *p_conf; int i_type; size_t i; @@ -272,14 +272,14 @@ void __config_ChainParse( vlc_object_t *p_this, const char *psz_prefix, ( !strncmp( cfg->psz_name, "no", 2 ) && !strcmp( ppsz_options[i], cfg->psz_name + 2 ) ) ) { - b_yes = VLC_FALSE; + b_yes = false; break; } if( *ppsz_options[i] == '*' && !strcmp( &ppsz_options[i][1], cfg->psz_name ) ) { - b_once = VLC_TRUE; + b_once = true; break; } @@ -320,30 +320,6 @@ void __config_ChainParse( vlc_object_t *p_this, const char *psz_prefix, msg_Warn( p_this, "Option %s is obsolete. Use %s instead.", name, psz_name ); } - if( p_conf->b_unsafe ) - { - int policy = config_GetInt( p_this, "security-policy" ); - switch( policy ) - { - case 0: /* block */ - msg_Err( p_this, "option %s is unsafe and is blocked by security policy", psz_name ); - return; - case 1: /* allow */ - break; - case 2: /* prompt */ - { - char description[256]; - snprintf(description, sizeof(description), _("playlist item is making use of the following unsafe option '%s', which may be harmful if used in a malicious way, authorize it ?"), psz_name); - if( DIALOG_OK_YES != intf_UserYesNo( p_this, _("WARNING: Unsafe Playlist"), description, _("Yes"), _("No"), NULL) ) - { - msg_Err( p_this, "option %s is unsafe and is blocked by security policy", psz_name ); - return; - } - } - default: - ; - } - } } /* */