aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-04-08 15:41:38 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-04-08 15:41:38 +0000
commit7dadabca8a3ccffdf361512b26c6bce28bcd381b (patch)
tree906d0632e7e1c8dd22e1ac6d12248c1a2d861505 /src
parent74e75378ae680c1fea4904f8e53152bd9db4dcba (diff)
downloadmpd-7dadabca8a3ccffdf361512b26c6bce28bcd381b.tar.gz
mpd-7dadabca8a3ccffdf361512b26c6bce28bcd381b.tar.xz
mpd-7dadabca8a3ccffdf361512b26c6bce28bcd381b.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/command.c2
1 files changed, 1 insertions, 1 deletions
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);