Detecting success/error in cli protocol?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(apologies for sending an incomplete mail earlier)

Hi

is there a way to detect that a CLI command has succeeded or failed when
using the socket interface offered by module-cli-protocol-unix?

Specifically I'm currently interested in the "play-file" command (which 
seems to be only accessible over the CLI interface). If the command 
fails because the daemon can't read the file, there is no error message 
returned back through the socket. Any error is only written to syslog.

In general I don't see any way of getting back the success/error status 
of a command. pulse-cli-syntax man page does not mention anything in 
this regard. "pacmd" also does not signal failures through its exit code.

I see that individual handlers in cli-command.c (including 
pa_cli_command_play_file) return -1 on error, but this status seems to 
be lost somewhere down the line. Is see that in line_callback() in cli.c 
the return value of pa_cli_command_execute_line() is ignored.

Does anyone have any thoughts on how proper error handling could be 
implemented in the cli interface? I would be happy to work on a patch to 
fix this.

Best regards
Tomaž


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux