From: Antoine Cellerier Date: Fri, 10 Nov 2006 00:08:16 +0000 (+0000) Subject: Return syntax error message when issuing invalid instance specific control command... X-Git-Tag: 0.9.0-test0~9587 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=14abbd807d9ffcfb993b603171a3e8ab10392ec0;p=vlc Return syntax error message when issuing invalid instance specific control command in VLM. ("control test thisisaninstanceid play" is valid, "control test thisisaninstanceid asdqsd" isn't). --- diff --git a/src/misc/vlm.c b/src/misc/vlm.c index 4efa112e1d..3dc96be01b 100644 --- a/src/misc/vlm.c +++ b/src/misc/vlm.c @@ -619,6 +619,12 @@ static int ExecuteCommand( vlm_t *p_vlm, const char *psz_command, psz_instance = ppsz_command[2]; if( i_command < 4 ) goto syntax_error; + + if( strcmp( ppsz_command[3], "play" ) && + strcmp( ppsz_command[3], "stop" ) && + strcmp( ppsz_command[3], "pause" ) && + strcmp( ppsz_command[3], "seek" ) ) + goto syntax_error; } psz_command = ppsz_command[i_index];