aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-16 16:40:22 +0100
committerMax Kellermann <max@duempel.org>2009-12-16 17:10:19 +0100
commit71fee0974402702c16b40dc6791196c46fb038bb (patch)
tree4e6270b610d56092970ea31193d09adf59490ae6 /src/archive_plugin.c
parentf9af1a445efedc049a6a608a76088578e3cca4b3 (diff)
downloadmpd-71fee0974402702c16b40dc6791196c46fb038bb.tar.gz
mpd-71fee0974402702c16b40dc6791196c46fb038bb.tar.xz
mpd-71fee0974402702c16b40dc6791196c46fb038bb.zip
archive_plugin: use GError in the open() method
Diffstat (limited to '')
-rw-r--r--src/archive_plugin.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/archive_plugin.c b/src/archive_plugin.c
index 2626c53fb..86334709b 100644
--- a/src/archive_plugin.c
+++ b/src/archive_plugin.c
@@ -23,15 +23,17 @@
#include <assert.h>
struct archive_file *
-archive_file_open(const struct archive_plugin *plugin, const char *path)
+archive_file_open(const struct archive_plugin *plugin, const char *path,
+ GError **error_r)
{
struct archive_file *file;
assert(plugin != NULL);
assert(plugin->open != NULL);
assert(path != NULL);
+ assert(error_r == NULL || *error_r == NULL);
- file = plugin->open(path);
+ file = plugin->open(path, error_r);
if (file != NULL) {
assert(file->plugin != NULL);
@@ -39,6 +41,9 @@ archive_file_open(const struct archive_plugin *plugin, const char *path)
assert(file->plugin->scan_reset != NULL);
assert(file->plugin->scan_next != NULL);
assert(file->plugin->open_stream != NULL);
+ assert(error_r == NULL || *error_r == NULL);
+ } else {
+ assert(error_r == NULL || *error_r != NULL);
}
return file;