From 0b44cad2ce2c6433f395650a5a70cf8b3473673c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Oct 2008 22:35:04 +0200 Subject: 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. --- src/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/command.c b/src/command.c index 1037c812d..3174faf70 100644 --- a/src/command.c +++ b/src/command.c @@ -464,7 +464,7 @@ static int handleAddId(struct client *client, enum playlist_result result = addToPlaylist(argv[1], &added_id); if (result != PLAYLIST_RESULT_SUCCESS) - return result; + return print_playlist_result(client, result); if (argc == 3) { int to; -- cgit v1.2.3