From 228b03edf8513aa1cdaf4e4647279cc580245555 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 14 Nov 2009 23:53:04 +0100 Subject: input_stream: return errors with GError --- src/playlist_queue.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/playlist_queue.c') diff --git a/src/playlist_queue.c b/src/playlist_queue.c index 0b4231f59..5b4439bbb 100644 --- a/src/playlist_queue.c +++ b/src/playlist_queue.c @@ -65,6 +65,7 @@ playlist_load_into_queue(struct playlist_provider *source, static enum playlist_result playlist_open_remote_into_queue(const char *uri, struct playlist *dest) { + GError *error = NULL; struct playlist_provider *playlist; bool stream = false; struct input_stream is; @@ -74,9 +75,16 @@ playlist_open_remote_into_queue(const char *uri, struct playlist *dest) playlist = playlist_list_open_uri(uri); if (playlist == NULL) { - stream = input_stream_open(&is, uri); - if (!stream) + stream = input_stream_open(&is, uri, &error); + if (!stream) { + if (error != NULL) { + g_warning("Failed to open %s: %s", + uri, error->message); + g_error_free(error); + } + return PLAYLIST_RESULT_NO_SUCH_LIST; + } playlist = playlist_list_open_stream(&is, uri); if (playlist == NULL) { -- cgit v1.2.3