aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:51:59 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:51:59 +0200
commit54371add1349e72684506868f72ee4919fd69b0a (patch)
tree832d83955a37152e6ce22fe6a796a4b32138558d /src/command.h
parent4ddc0a48e2e53acc58990ec72e907a136e51d77e (diff)
downloadmpd-54371add1349e72684506868f72ee4919fd69b0a.tar.gz
mpd-54371add1349e72684506868f72ee4919fd69b0a.tar.xz
mpd-54371add1349e72684506868f72ee4919fd69b0a.zip
command: added command_success() and command_error()
These two functions take a client struct instead of the file descriptor. We will now begin passing the client struct around instead of a raw file descriptor (which needed a linear lookup in the client list to be useful).
Diffstat (limited to 'src/command.h')
-rw-r--r--src/command.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/command.h b/src/command.h
index 1018102cd..594ca2724 100644
--- a/src/command.h
+++ b/src/command.h
@@ -22,7 +22,6 @@
#include "gcc.h"
#include "os_compat.h"
#include "sllist.h"
-#include "myfprintf.h"
#define COMMAND_RETURN_KILL 10
#define COMMAND_RETURN_CLOSE 20
@@ -40,8 +39,11 @@ void initCommands(void);
void finishCommands(void);
-#define commandSuccess(fd) fdprintf(fd, "OK\n")
-
mpd_fprintf_ void commandError(int fd, int error, const char *fmt, ...);
+void command_success(struct client *client);
+
+mpd_fprintf_ void command_error(struct client *client, int error,
+ const char *fmt, ...);
+
#endif