diff options
author | Max Kellermann <max@duempel.org> | 2009-11-14 23:53:04 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-15 23:12:11 +0100 |
commit | 228b03edf8513aa1cdaf4e4647279cc580245555 (patch) | |
tree | 7f5b03a9727fb8c371885469296eb7f49f6fa68b /test/dump_playlist.c | |
parent | d000d31355c824a076324b647a3f056aab9ddabe (diff) | |
download | mpd-228b03edf8513aa1cdaf4e4647279cc580245555.tar.gz mpd-228b03edf8513aa1cdaf4e4647279cc580245555.tar.xz mpd-228b03edf8513aa1cdaf4e4647279cc580245555.zip |
input_stream: return errors with GError
Diffstat (limited to 'test/dump_playlist.c')
-rw-r--r-- | test/dump_playlist.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/dump_playlist.c b/test/dump_playlist.c index fba9498a7..bf31400fe 100644 --- a/test/dump_playlist.c +++ b/test/dump_playlist.c @@ -88,17 +88,24 @@ int main(int argc, char **argv) if (playlist == NULL) { /* open the stream and wait until it becomes ready */ - success = input_stream_open(&is, uri); + success = input_stream_open(&is, uri, &error); if (!success) { - g_printerr("input_stream_open() failed\n"); + if (error != NULL) { + g_warning("%s", error->message); + g_error_free(error); + } else + g_printerr("input_stream_open() failed\n"); return 2; } while (!is.ready) { - int ret = input_stream_buffer(&is); - if (ret < 0) + int ret = input_stream_buffer(&is, &error); + if (ret < 0) { /* error */ + g_warning("%s", error->message); + g_error_free(error); return 2; + } if (ret == 0) /* nothing was buffered - wait */ |