diff options
author | Max Kellermann <max@duempel.org> | 2014-03-02 00:17:32 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-03-02 00:17:32 +0100 |
commit | 2bf2f34b1211bfde95ef4ada77147a8b65830084 (patch) | |
tree | a6e639ccd3d07d445968f888e59bab580981ce89 /src/input/plugins/SmbclientInputPlugin.cxx | |
parent | 7453c26ec4838760dec767b2f99afff9eb537d53 (diff) | |
download | mpd-2bf2f34b1211bfde95ef4ada77147a8b65830084.tar.gz mpd-2bf2f34b1211bfde95ef4ada77147a8b65830084.tar.xz mpd-2bf2f34b1211bfde95ef4ada77147a8b65830084.zip |
InputPlugin: allow init() to soft-fail
Add enum InputResult which is a tri-state. Input plugins may now fail
and just become unavailable.
Diffstat (limited to 'src/input/plugins/SmbclientInputPlugin.cxx')
-rw-r--r-- | src/input/plugins/SmbclientInputPlugin.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/input/plugins/SmbclientInputPlugin.cxx b/src/input/plugins/SmbclientInputPlugin.cxx index 6f2c191b0..9709d089a 100644 --- a/src/input/plugins/SmbclientInputPlugin.cxx +++ b/src/input/plugins/SmbclientInputPlugin.cxx @@ -91,17 +91,17 @@ public: * */ -static bool +static InputPlugin::InitResult input_smbclient_init(gcc_unused const config_param ¶m, Error &error) { if (!SmbclientInit(error)) - return false; + return InputPlugin::InitResult::UNAVAILABLE; // TODO: create one global SMBCCTX here? // TODO: evaluate config_param, call smbc_setOption*() - return true; + return InputPlugin::InitResult::SUCCESS; } static InputStream * |