command: print error message on "addid" failure
Returning the playlist_result value from a command handler does not make sense. Call print_playlist_result() there, and forward its return value.
This commit is contained in:
@@ -464,7 +464,7 @@ static int handleAddId(struct client *client,
|
|||||||
enum playlist_result result = addToPlaylist(argv[1], &added_id);
|
enum playlist_result result = addToPlaylist(argv[1], &added_id);
|
||||||
|
|
||||||
if (result != PLAYLIST_RESULT_SUCCESS)
|
if (result != PLAYLIST_RESULT_SUCCESS)
|
||||||
return result;
|
return print_playlist_result(client, result);
|
||||||
|
|
||||||
if (argc == 3) {
|
if (argc == 3) {
|
||||||
int to;
|
int to;
|
||||||
|
Reference in New Issue
Block a user