- Use jack_set_error_function() (currently no-op)
In the case of clients that use jack_options_t JackNoStartServer,
running it with no server started produces verbose output in the form:
```
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JACK server not running?
```
Setting a no-op error handler before trying jack_client_open()
will hide these messages.
Checking the status allows to output a user-friendly error message.
The first string is generic for any fail of jack_client_open()
`Error: cannot connect to JACK, `
Most importantly it informs the user that there is an error.
Depending on status the string is extended with either
`server is not running.`
or
`jack_client_open() failed, status =...`
if the status indicates anything else than JackServerFailed.
Running jack_lsp or jack_connect with no server running outputs (new)
`
Error: cannot connect to JACK, server is not running.
`
More aspects of example_clients/* can be reviewed for unification.
Some do ask:
`JACK server not running?`
Others tell
`JACK server not running.`
If this commit won't show deficits: jack_client_open() sections can be
changed in all example_clients accordingly.
Note: obviously the --version option is currently a NO-OP in many client programs. This needs a closer look.
When jack_connect is called without any argument, it causes a segfault
in
snprintf( portA, sizeof(portA), "%s", argv[argc-1] );
snprintf( portB, sizeof(portB), "%s", argv[argc-2] );
Reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=662199