mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	cli-command: Report error in pa_play_file.
Current code does not check whether pa_play_file call failed. Hence no error is reported in the cli interface if playback failed because e.g. file isn't readable by the daemon.
This commit is contained in:
		
							parent
							
								
									e6226b07c0
								
							
						
					
					
						commit
						3f2a0c17ba
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1282,7 +1282,12 @@ static int pa_cli_command_play_file(pa_core *c, pa_tokenizer *t, pa_strbuf *buf,
 | 
			
		|||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return pa_play_file(sink, fname, NULL);
 | 
			
		||||
    if (pa_play_file(sink, fname, NULL) < 0) {
 | 
			
		||||
        pa_strbuf_puts(buf, "Failed to play sound file.\n");
 | 
			
		||||
        return -1;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static int pa_cli_command_list_shared_props(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, bool *fail) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue