diff options
author | Max Kellermann <max@duempel.org> | 2014-01-25 23:29:42 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-25 23:29:42 +0100 |
commit | 86ca5b3f16bb5804d26bff91b4e16a458173b70d (patch) | |
tree | 867bd012dc6afb11ec38ae26fbfd59cbea684da4 /src/input/plugins/SmbclientInputPlugin.cxx | |
parent | 9b1fbdbca63f03c357a2f9c01fca281f62b3570c (diff) | |
download | mpd-86ca5b3f16bb5804d26bff91b4e16a458173b70d.tar.gz mpd-86ca5b3f16bb5804d26bff91b4e16a458173b70d.tar.xz mpd-86ca5b3f16bb5804d26bff91b4e16a458173b70d.zip |
input/smbclient: move code to lib/smbclient/Init.cxx
Diffstat (limited to 'src/input/plugins/SmbclientInputPlugin.cxx')
-rw-r--r-- | src/input/plugins/SmbclientInputPlugin.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
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 <libsmbclient.h> -#include <string.h> - 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? |