]> git.sesse.net Git - vlc/commitdiff
Return syntax error message when issuing invalid instance specific control command...
authorAntoine Cellerier <dionoea@videolan.org>
Fri, 10 Nov 2006 00:08:16 +0000 (00:08 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Fri, 10 Nov 2006 00:08:16 +0000 (00:08 +0000)
src/misc/vlm.c

index 4efa112e1de2ff231b7b5283b2986d15908e7dfa..3dc96be01bec5c1598c62e07d8e5dc802586c6b9 100644 (file)
@@ -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];