From b8ed4200586db697edd051c7fc21b78c92d4255b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Feb 2012 18:46:30 +0100 Subject: command: move functions to protocol/result.c --- src/command.c | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) (limited to 'src/command.c') diff --git a/src/command.c b/src/command.c index 2f2159e87..85d034da0 100644 --- a/src/command.c +++ b/src/command.c @@ -19,6 +19,7 @@ #include "config.h" #include "command.h" +#include "protocol/result.h" #include "player_control.h" #include "playlist.h" #include "playlist_print.h" @@ -114,37 +115,6 @@ static const char need_range[] = "need a range"; static const char check_integer[] = "\"%s\" is not a integer"; static const char need_integer[] = "need an integer"; -static const char *current_command; -static int command_list_num; - -void command_success(struct client *client) -{ - client_puts(client, "OK\n"); -} - -static void command_error_v(struct client *client, enum ack error, - const char *fmt, va_list args) -{ - assert(client != NULL); - assert(current_command != NULL); - - client_printf(client, "ACK [%i@%i] {%s} ", - (int)error, command_list_num, current_command); - client_vprintf(client, fmt, args); - client_puts(client, "\n"); - - current_command = NULL; -} - -G_GNUC_PRINTF(3, 4) static void command_error(struct client *client, enum ack error, - const char *fmt, ...) -{ - va_list args; - va_start(args, fmt); - command_error_v(client, error, fmt, args); - va_end(args); -} - static bool G_GNUC_PRINTF(4, 5) check_uint32(struct client *client, uint32_t *dst, const char *s, const char *fmt, ...) -- cgit v1.2.3