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.
This commit is contained in:
parent
9a5b599883
commit
05f66e04a4
@ -853,13 +853,16 @@ static int handleUpdate(struct client *client,
|
|||||||
List *pathList = makeList(NULL, 1);
|
List *pathList = makeList(NULL, 1);
|
||||||
insertInList(pathList, argv[1], NULL);
|
insertInList(pathList, argv[1], NULL);
|
||||||
ret = updateInit(pathList);
|
ret = updateInit(pathList);
|
||||||
if (ret == -1)
|
} else {
|
||||||
command_error(client, ACK_ERROR_UPDATE_ALREADY,
|
ret = updateInit(NULL);
|
||||||
"already updating");
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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,
|
static int handleNext(mpd_unused struct client *client,
|
||||||
|
Loading…
Reference in New Issue
Block a user