From 7dadabca8a3ccffdf361512b26c6bce28bcd381b Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sun, 8 Apr 2007 15:41:38 +0000 Subject: 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 --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command.c b/src/command.c index 27e493046..e62919e90 100644 --- a/src/command.c +++ b/src/command.c @@ -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); -- cgit v1.2.3