aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:11:24 +0100
committerMax Kellermann <max@duempel.org>2009-01-13 23:08:34 +0100
commiteee8bba78de8eba50f7cc7ca828ca06ed89c5893 (patch)
tree27398db999dca64844e1052d1cb95df1b1cb2f65
parent63181233bb2a28ccd3776d48aa2229df920c2ed3 (diff)
downloadmpd-eee8bba78de8eba50f7cc7ca828ca06ed89c5893.tar.gz
mpd-eee8bba78de8eba50f7cc7ca828ca06ed89c5893.tar.xz
mpd-eee8bba78de8eba50f7cc7ca828ca06ed89c5893.zip
playlist: log errors during loadPlaylist()
Don't call command_error() if loading a song from the playlist fails. This may result in assertion failures, since command_error() may be called more than once.
-rw-r--r--NEWS1
-rw-r--r--src/command.c2
-rw-r--r--src/playlist.c5
-rw-r--r--src/playlist.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 2a766121f..ed41be130 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ MPD 0.14.1 - not yet released
* configure.ac: check for pkg-config before using it
* fix minor memory leak in decoder_tag()
* fix cross-fading bug: it used to play some chunks of the new song twice
+* playlist: fix assertion failure during playlist load
ver 0.14 (2008/12/25)
diff --git a/src/command.c b/src/command.c
index 9793830c1..dd4c4b3cd 100644
--- a/src/command.c
+++ b/src/command.c
@@ -564,7 +564,7 @@ handle_load(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
{
enum playlist_result result;
- result = loadPlaylist(client, argv[1]);
+ result = loadPlaylist(argv[1]);
return print_playlist_result(client, result);
}
diff --git a/src/playlist.c b/src/playlist.c
index ba69844de..5ad3ffe27 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1308,7 +1308,7 @@ int PlaylistInfo(struct client *client, const char *utf8file, int detail)
return 0;
}
-enum playlist_result loadPlaylist(struct client *client, const char *utf8file)
+enum playlist_result loadPlaylist(const char *utf8file)
{
GPtrArray *list;
@@ -1327,8 +1327,7 @@ enum playlist_result loadPlaylist(struct client *client, const char *utf8file)
p++;
}
if ((addToPlaylist(temp, NULL)) != PLAYLIST_RESULT_SUCCESS) {
- command_error(client, ACK_ERROR_PLAYLIST_LOAD,
- "can't add file \"%s\"", temp2);
+ g_warning("can't add file \"%s\"", temp2);
}
free(temp2);
}
diff --git a/src/playlist.h b/src/playlist.h
index 137475afb..dfbba2e12 100644
--- a/src/playlist.h
+++ b/src/playlist.h
@@ -124,7 +124,7 @@ enum playlist_result swapSongsInPlaylist(unsigned song1, unsigned song2);
enum playlist_result swapSongsInPlaylistById(unsigned id1, unsigned id2);
-enum playlist_result loadPlaylist(struct client *client, const char *utf8file);
+enum playlist_result loadPlaylist(const char *utf8file);
bool getPlaylistRepeatStatus(void);