From b242175e181b4d9cbcd4087a38c9601ffba7ddc7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 1 Nov 2009 15:27:55 +0100 Subject: song_save: increased maximum line length to 32 kB The line buffer had a fixed size of 5 kB, and was allocated on the stack. This was too small for some users. As a hotfix, we're increasing the buffer size to 32 kB now, allocated on the heap. In MPD 0.16, we'll switch to dynamic allocation. --- NEWS | 1 + src/song_save.c | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 4969dc91b..2e314295a 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.15.6 (2009/??/??) - ffmpeg: convert metadata * output_thread: check again if output is open on PAUSE * update: delete ignored symlinks from database +* database: increased maximum line length to 32 kB ver 0.15.5 (2009/10/18) diff --git a/src/song_save.c b/src/song_save.c index 8f4e1614d..2d6297f3e 100644 --- a/src/song_save.c +++ b/src/song_save.c @@ -21,7 +21,6 @@ #include "song.h" #include "tag_save.h" #include "directory.h" -#include "path.h" #include "tag.h" #include @@ -113,12 +112,15 @@ matchesAnMpdTagItemKey(char *buffer, enum tag_type *itemType) void readSongInfoIntoList(FILE *fp, struct songvec *sv, struct directory *parent) { - char buffer[MPD_PATH_MAX + 1024]; + enum { + buffer_size = 32768, + }; + char *buffer = g_malloc(buffer_size); struct song *song = NULL; enum tag_type itemType; const char *value; - while (fgets(buffer, sizeof(buffer), fp) && + while (fgets(buffer, buffer_size, fp) && !g_str_has_prefix(buffer, SONG_END)) { g_strchomp(buffer); @@ -156,6 +158,8 @@ void readSongInfoIntoList(FILE *fp, struct songvec *sv, g_error("unknown line in db: %s", buffer); } + g_free(buffer); + if (song) insertSongIntoList(sv, song); } -- cgit v1.2.3 From 8c0680f6b986f7b4637139689d513e4d13c1af47 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 20:54:17 +0100 Subject: input/lastfm: fixed variable name in GLib<2.16 code path Should be "lastfm_user", not "lastfm_username". --- NEWS | 2 ++ src/input/lastfm_input_plugin.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2e314295a..2c76c6b93 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.15.6 (2009/??/??) +* input: + - lastfm: fixed variable name in GLib<2.16 code path * decoders: - ffmpeg: convert metadata * output_thread: check again if output is open on PAUSE diff --git a/src/input/lastfm_input_plugin.c b/src/input/lastfm_input_plugin.c index 0039f7069..8e13a60a9 100644 --- a/src/input/lastfm_input_plugin.c +++ b/src/input/lastfm_input_plugin.c @@ -112,7 +112,7 @@ lastfm_input_open(struct input_stream *is, const char *url) #if GLIB_CHECK_VERSION(2,16,0) q = g_uri_escape_string(lastfm_user, NULL, false); #else - q = g_strdup(lastfm_username); + q = g_strdup(lastfm_user); #endif #if GLIB_CHECK_VERSION(2,16,0) -- cgit v1.2.3 From 937b2b1744052104f243953f58809aabcd8a0770 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 20:55:29 +0100 Subject: sticker: added fallback for sqlite3_prepare_v2() This function was not present in SQLite < 3.4. --- NEWS | 1 + src/sticker.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 2c76c6b93..3c6fc4141 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ ver 0.15.6 (2009/??/??) * output_thread: check again if output is open on PAUSE * update: delete ignored symlinks from database * database: increased maximum line length to 32 kB +* sticker: added fallback for sqlite3_prepare_v2() ver 0.15.5 (2009/10/18) diff --git a/src/sticker.c b/src/sticker.c index 0d30fbb70..cded09fca 100644 --- a/src/sticker.c +++ b/src/sticker.c @@ -27,6 +27,10 @@ #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "sticker" +#if SQLITE_VERSION_NUMBER < 3003009 +#define sqlite3_prepare_v2 sqlite3_prepare +#endif + struct sticker { GHashTable *table; }; -- cgit v1.2.3 From 96fcf5e1a5006fb43f245db02182dd7fd86a8161 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 20:57:10 +0100 Subject: input/mms: require libmms 0.4 We're using API functions which are not available in 0.3. --- NEWS | 1 + configure.ac | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3c6fc4141..709cd6751 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.15.6 (2009/??/??) * input: - lastfm: fixed variable name in GLib<2.16 code path + - input/mms: require libmms 0.4 * decoders: - ffmpeg: convert metadata * output_thread: check again if output is open on PAUSE diff --git a/configure.ac b/configure.ac index 047809a67..a57f72e2f 100644 --- a/configure.ac +++ b/configure.ac @@ -303,7 +303,7 @@ AC_ARG_ENABLE(mms, [enable the MMS protocol with libmms]),, [enable_mms=auto]) -MPD_AUTO_PKG(mms, MMS, [libmms], +MPD_AUTO_PKG(mms, MMS, [libmms >= 0.4], [libmms mms:// protocol support], [libmms not found]) if test x$enable_mms = xyes; then AC_DEFINE(ENABLE_MMS, 1, -- cgit v1.2.3 From 93a13b42dd3d792a32c5e256d5172cf7647a3fc5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 10 Nov 2009 21:00:10 +0100 Subject: zzip: require libzzip 0.13 We need the function zzip_file_stat(). --- NEWS | 2 ++ configure.ac | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 709cd6751..33cf15b15 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ ver 0.15.6 (2009/??/??) * input: - lastfm: fixed variable name in GLib<2.16 code path - input/mms: require libmms 0.4 +* archive: + - zzip: require libzzip 0.13 * decoders: - ffmpeg: convert metadata * output_thread: check again if output is open on PAUSE diff --git a/configure.ac b/configure.ac index a57f72e2f..83fad5724 100644 --- a/configure.ac +++ b/configure.ac @@ -339,7 +339,7 @@ AC_ARG_ENABLE(zip, [enable zip archive support (default: disabled)]),, enable_zip=no) -MPD_AUTO_PKG(zip, ZZIP, [zziplib], +MPD_AUTO_PKG(zip, ZZIP, [zziplib >= 0.13], [libzzip archive library], [libzzip not found]) AM_CONDITIONAL(HAVE_ZIP, test x$enable_zip = xyes) -- cgit v1.2.3