From 86ca5b3f16bb5804d26bff91b4e16a458173b70d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 25 Jan 2014 23:29:42 +0100 Subject: input/smbclient: move code to lib/smbclient/Init.cxx --- src/input/plugins/SmbclientInputPlugin.cxx | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/input/plugins/SmbclientInputPlugin.cxx') diff --git a/src/input/plugins/SmbclientInputPlugin.cxx b/src/input/plugins/SmbclientInputPlugin.cxx index 9fbe72b59..561e6f8fd 100644 --- a/src/input/plugins/SmbclientInputPlugin.cxx +++ b/src/input/plugins/SmbclientInputPlugin.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "SmbclientInputPlugin.hxx" +#include "lib/smbclient/Init.hxx" #include "../InputStream.hxx" #include "../InputPlugin.hxx" #include "util/StringUtil.hxx" @@ -26,8 +27,6 @@ #include -#include - class SmbclientInputStream { InputStream base; @@ -80,19 +79,6 @@ public: } }; -static void -mpd_smbc_get_auth_data(gcc_unused const char *srv, - gcc_unused const char *shr, - char *wg, gcc_unused int wglen, - char *un, gcc_unused int unlen, - char *pw, gcc_unused int pwlen) -{ - // TODO: implement - strcpy(wg, "WORKGROUP"); - strcpy(un, "foo"); - strcpy(pw, "bar"); -} - /* * InputPlugin methods * @@ -101,11 +87,8 @@ mpd_smbc_get_auth_data(gcc_unused const char *srv, static bool input_smbclient_init(gcc_unused const config_param ¶m, Error &error) { - constexpr int debug = 0; - if (smbc_init(mpd_smbc_get_auth_data, debug) < 0) { - error.SetErrno("smbc_init() failed"); + if (!SmbclientInit(error)) return false; - } // TODO: create one global SMBCCTX here? -- cgit v1.2.3