Commit 7dadabca authored by J. Alexander Treuman's avatar J. Alexander Treuman

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
parent 74e75378
...@@ -1209,7 +1209,7 @@ mpd_fprintf_ void commandError(int fd, int error, const char *fmt, ...) ...@@ -1209,7 +1209,7 @@ mpd_fprintf_ void commandError(int fd, int error, const char *fmt, ...)
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
if (current_command) { if (current_command && fd != STDERR_FILENO) {
fdprintf(fd, "ACK [%i@%i] {%s} ", fdprintf(fd, "ACK [%i@%i] {%s} ",
(int)error, command_listNum, current_command); (int)error, command_listNum, current_command);
vfdprintf(fd, fmt, args); vfdprintf(fd, fmt, args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment