aboutsummaryrefslogtreecommitdiffstats
path: root/src/input/plugins/SmbclientInputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-03-02 00:17:32 +0100
committerMax Kellermann <max@duempel.org>2014-03-02 00:17:32 +0100
commit2bf2f34b1211bfde95ef4ada77147a8b65830084 (patch)
treea6e639ccd3d07d445968f888e59bab580981ce89 /src/input/plugins/SmbclientInputPlugin.cxx
parent7453c26ec4838760dec767b2f99afff9eb537d53 (diff)
downloadmpd-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.cxx6
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 &param, 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 *