make the error message one single identifier by linking the error number to the message with an underscore.

This commit is contained in:
Mike Brady
2022-12-30 19:31:01 +00:00
parent 5bc072eb9f
commit ae5910e2e7
+4 -4
View File
@@ -449,11 +449,11 @@ static int actual_open_alsa_device(int do_auto_setup) {
config.unfixable_error_reported = 1;
char messageString[1024];
messageString[0] = '\0';
snprintf(messageString, sizeof(messageString), "output_device_error %d", -ret);
snprintf(messageString, sizeof(messageString), "output_device_error_%d", -ret);
if (config.cmd_unfixable) {
command_execute(config.cmd_unfixable, messageString, 1);
} else {
die("an unrecoverable error, \"output_device_error %d\", has been "
die("an unrecoverable error, \"output_device_error_%d\", has been "
"detected.", -ret);
}
}
@@ -1806,9 +1806,9 @@ static int do_play(void *buf, int samples) {
if (config.unfixable_error_reported == 0) {
config.unfixable_error_reported = 1;
if (config.cmd_unfixable) {
command_execute(config.cmd_unfixable, "output_device_error 19", 1);
command_execute(config.cmd_unfixable, "output_device_error_19", 1);
} else {
die("an unrecoverable error, \"output_device_error 19\", has been "
die("an unrecoverable error, \"output_device_error_19\", has been "
"detected.");
}
}