aboutsummaryrefslogtreecommitdiffstats
path: root/src/command.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:24:51 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:24:51 +0200
commit33aec0d6732a529342e59933b351f4e591d8f8f4 (patch)
treed0bb8a5729398cbf57d63058f6ecf6cd7736a731 /src/command.c
parenta34e1d2b84c72b27212eed4e1483a20440da44ab (diff)
downloadmpd-33aec0d6732a529342e59933b351f4e591d8f8f4.tar.gz
mpd-33aec0d6732a529342e59933b351f4e591d8f8f4.tar.xz
mpd-33aec0d6732a529342e59933b351f4e591d8f8f4.zip
client: added client_write() and client_puts()
client_write() writes a buffer to the client and buffers it if required. client_puts() does the same for a C string. The next patch will add more tools which will replace fdprintf() later.
Diffstat (limited to 'src/command.c')
-rw-r--r--src/command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c
index 834fb6420..faa68e8d0 100644
--- a/src/command.c
+++ b/src/command.c
@@ -1239,7 +1239,6 @@ static int processCommandInternal(struct client *client,
int processListOfCommands(struct client *client, int *permission,
int listOK, struct strnode *list)
{
- int fd = client_get_fd(client);
struct strnode *cur = list;
int ret = 0;
@@ -1253,7 +1252,7 @@ int processListOfCommands(struct client *client, int *permission,
if (ret != 0 || client_is_expired(client))
goto out;
else if (listOK)
- fdprintf(fd, "list_OK\n");
+ client_puts(client, "list_OK\n");
command_listNum++;
cur = cur->next;
}