From 05f66e04a413114103ca3a14f742b0430f6858e0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Sep 2008 22:46:03 +0200 Subject: update: send proper response to the client Due to a merge error, I broke the function handleUpdate(). It did not do anything for the global update, and it did not send a proper response to the client. This patch fixes both bugs. --- src/command.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/command.c b/src/command.c index 3a4a218e9..6ebcb977c 100644 --- a/src/command.c +++ b/src/command.c @@ -853,13 +853,16 @@ static int handleUpdate(struct client *client, List *pathList = makeList(NULL, 1); insertInList(pathList, argv[1], NULL); ret = updateInit(pathList); - if (ret == -1) - command_error(client, ACK_ERROR_UPDATE_ALREADY, - "already updating"); - return ret; + } else { + ret = updateInit(NULL); } - return ret; + if (ret == -1) + command_error(client, ACK_ERROR_UPDATE_ALREADY, + "already updating"); + + client_printf(client, "updating_db: %i\n", ret); + return 0; } static int handleNext(mpd_unused struct client *client, -- cgit v1.2.3