aboutsummaryrefslogtreecommitdiffstats
path: root/src/song_save.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-15 18:23:00 +0100
committerMax Kellermann <max@duempel.org>2009-03-15 18:23:00 +0100
commita899c210b9de405a232f0cd102ca9409ef89518b (patch)
tree3b42f6d527cb92c8f1c3c1592541511ce14d283d /src/song_save.c
parent9e30dfb9c195dab50c4d0173885a94e7b81d45bd (diff)
downloadmpd-a899c210b9de405a232f0cd102ca9409ef89518b.tar.gz
mpd-a899c210b9de405a232f0cd102ca9409ef89518b.tar.xz
mpd-a899c210b9de405a232f0cd102ca9409ef89518b.zip
log: removed DEBUG() and FATAL()
Use GLib the logging functions g_debug(), g_error() instead.
Diffstat (limited to '')
-rw-r--r--src/song_save.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/song_save.c b/src/song_save.c
index e0d61a3be..1d2724e83 100644
--- a/src/song_save.c
+++ b/src/song_save.c
@@ -23,10 +23,14 @@
#include "directory.h"
#include "path.h"
#include "tag.h"
-#include "log.h"
+
+#include <glib.h>
#include <stdlib.h>
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "song"
+
#define SONG_KEY "key: "
#define SONG_MTIME "mtime: "
@@ -126,7 +130,7 @@ void readSongInfoIntoList(FILE *fp, struct songvec *sv,
} else if (*buffer == 0) {
/* ignore empty lines (starting with '\0') */
} else if (song == NULL) {
- FATAL("Problems reading song info\n");
+ g_error("Problems reading song info");
} else if (0 == strncmp(SONG_FILE, buffer, strlen(SONG_FILE))) {
/* we don't need this info anymore */
} else if ((value = matchesAnMpdTagItemKey(buffer,
@@ -148,7 +152,7 @@ void readSongInfoIntoList(FILE *fp, struct songvec *sv,
song->mtime = atoi(&(buffer[strlen(SONG_MTIME)]));
}
else
- FATAL("songinfo: unknown line in db: %s\n", buffer);
+ g_error("unknown line in db: %s", buffer);
}
if (song)