aboutsummaryrefslogtreecommitdiffstats
path: root/src/storedPlaylist.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-01-01 10:09:18 +0000
committerEric Wong <normalperson@yhbt.net>2008-01-01 10:09:18 +0000
commit68b9f4138140bb9c11a5f0009b23885e3f47adc5 (patch)
tree4a9d246b2e830334acb061e4aae6084ac4ffd0fb /src/storedPlaylist.c
parent47efe4232123443b3fd33732df08969f3fd7300e (diff)
downloadmpd-68b9f4138140bb9c11a5f0009b23885e3f47adc5.tar.gz
mpd-68b9f4138140bb9c11a5f0009b23885e3f47adc5.tar.xz
mpd-68b9f4138140bb9c11a5f0009b23885e3f47adc5.zip
playlist: avoid the use of newStoredPlaylist for saving active playlists
It was a nice way to double the memory needed to write the playlist to a file. git-svn-id: https://svn.musicpd.org/mpd/trunk@7116 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/storedPlaylist.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/storedPlaylist.c b/src/storedPlaylist.c
index 062a0ad1f..68122b5b4 100644
--- a/src/storedPlaylist.c
+++ b/src/storedPlaylist.c
@@ -29,29 +29,6 @@
#include <string.h>
#include <errno.h>
-/*
- * Not supporting '/' was done out of laziness, and we should really
- * strive to support it in the future.
- *
- * Not supporting '\r' and '\n' is done out of protocol limitations (and
- * arguably laziness), but bending over head over heels to modify the
- * protocol (and compatibility with all clients) to support idiots who
- * put '\r' and '\n' in filenames isn't going to happen, either.
- */
-static int valid_playlist_name(int err_fd, const char *utf8path)
-{
- if (strchr(utf8path, '/') ||
- strchr(utf8path, '\n') ||
- strchr(utf8path, '\r')) {
- commandError(err_fd, ACK_ERROR_ARG, "playlist name \"%s\" is "
- "invalid: playlist names may not contain slashes,"
- " newlines or carriage returns",
- utf8path);
- return 0;
- }
- return 1;
-}
-
static unsigned int lengthOfStoredPlaylist(StoredPlaylist *sp)
{
return sp->list->numberOfNodes;