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:
J. Alexander Treuman 2007-04-08 15:41:38 +00:00
parent 74e75378ae
commit 7dadabca8a

View File

@ -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);