aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/PlsPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-10 18:02:44 +0200
committerMax Kellermann <max@duempel.org>2013-09-04 18:14:22 +0200
commit29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch)
tree79766830b55ebca38ddbce84d8d548227eedb69e /src/playlist/PlsPlaylistPlugin.cxx
parentc9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff)
downloadmpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz
mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to 'src/playlist/PlsPlaylistPlugin.cxx')
-rw-r--r--src/playlist/PlsPlaylistPlugin.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/PlsPlaylistPlugin.cxx
index 9ef302388..ab8f93bef 100644
--- a/src/playlist/PlsPlaylistPlugin.cxx
+++ b/src/playlist/PlsPlaylistPlugin.cxx
@@ -23,6 +23,7 @@
#include "InputLegacy.hxx"
#include "Song.hxx"
#include "Tag.hxx"
+#include "util/Error.hxx"
#include <glib.h>
@@ -104,6 +105,7 @@ static struct playlist_provider *
pls_open_stream(struct input_stream *is)
{
GError *error = NULL;
+ Error error2;
size_t nbytes;
char buffer[1024];
bool success;
@@ -113,11 +115,10 @@ pls_open_stream(struct input_stream *is)
do {
nbytes = input_stream_lock_read(is, buffer, sizeof(buffer),
- &error);
+ error2);
if (nbytes == 0) {
- if (error != NULL) {
- g_warning("%s", error->message);
- g_error_free(error);
+ if (error2.IsDefined()) {
+ g_warning("%s", error2.GetMessage());
return NULL;
}