Commit 2bc38992 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

intf-add: do not list CLI if stdin is not a TTY (fix #4955)

(cherry picked from commit 8ac466488795c555fb32978509eb62df40ad57f0)
parent 146dedfd
......@@ -87,10 +87,12 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
VLC_VAR_HASCHOICE | VLC_VAR_ISCOMMAND );
text.psz_string = _("Add Interface");
var_Change( p_intf, "intf-add", VLC_VAR_SETTEXT, &text, NULL );
val.psz_string = (char *)"rc";
text.psz_string = (char *)_("Console");
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
if( isatty( 0 ) )
{
val.psz_string = (char *)"rc";
text.psz_string = (char *)_("Console");
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
}
val.psz_string = (char *)"telnet";
text.psz_string = (char *)_("Telnet Interface");
var_Change( p_intf, "intf-add", VLC_VAR_ADDCHOICE, &val, &text );
......
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