From 2bf2f34b1211bfde95ef4ada77147a8b65830084 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 2 Mar 2014 00:17:32 +0100 Subject: InputPlugin: allow init() to soft-fail Add enum InputResult which is a tri-state. Input plugins may now fail and just become unavailable. --- src/input/plugins/SmbclientInputPlugin.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input/plugins/SmbclientInputPlugin.cxx') 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 * -- cgit v1.2.3