aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-25 22:46:03 +0200
committerMax Kellermann <max@duempel.org>2008-09-25 22:46:03 +0200
commit05f66e04a413114103ca3a14f742b0430f6858e0 (patch)
treeaa26d43e02ec5999bda8393287163bd38d355653
parent9a5b5998832f1f9f6efce99f4abdf00f5fe1dfbb (diff)
downloadmpd-05f66e04a413114103ca3a14f742b0430f6858e0.tar.gz
mpd-05f66e04a413114103ca3a14f742b0430f6858e0.tar.xz
mpd-05f66e04a413114103ca3a14f742b0430f6858e0.zip
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.
-rw-r--r--src/command.c13
1 files 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,