From 33aec0d6732a529342e59933b351f4e591d8f8f4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 7 Sep 2008 13:24:51 +0200 Subject: 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. --- src/command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/command.c') 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; } -- cgit v1.2.3