When calling commandError(STDERR_FILENO, ...), don't set current_command to
NULL. Doing so would mean future calls to commandError with a socket as an argument will still write the error message to the error log, and not the socket. git-svn-id: https://svn.musicpd.org/mpd/trunk@5891 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
74e75378ae
commit
7dadabca8a
@ -1209,7 +1209,7 @@ mpd_fprintf_ void commandError(int fd, int error, const char *fmt, ...)
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
|
||||
if (current_command) {
|
||||
if (current_command && fd != STDERR_FILENO) {
|
||||
fdprintf(fd, "ACK [%i@%i] {%s} ",
|
||||
(int)error, command_listNum, current_command);
|
||||
vfdprintf(fd, fmt, args);
|
||||
|
Loading…
Reference in New Issue
Block a user