diff options
author | Max Kellermann <max@musicpd.org> | 2020-07-20 22:34:07 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-07-20 22:34:56 +0200 |
commit | 2a15fafbd76081fbb6e5c079dfb7d0902ec2de60 (patch) | |
tree | 0c48a099f39287b28c7a452af7aaadedbfffa841 | |
parent | 2fc4802886e81a8cecdb6697d79b54852c7ec6b3 (diff) |
input/smbclient: remove mutex locking
This is no longer necessary with the new API.
-rw-r--r-- | src/input/plugins/SmbclientInputPlugin.cxx | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/input/plugins/SmbclientInputPlugin.cxx b/src/input/plugins/SmbclientInputPlugin.cxx index 08e918748..6799e87ed 100644 --- a/src/input/plugins/SmbclientInputPlugin.cxx +++ b/src/input/plugins/SmbclientInputPlugin.cxx @@ -20,7 +20,6 @@ #include "SmbclientInputPlugin.hxx" #include "lib/smbclient/Init.hxx" #include "lib/smbclient/Context.hxx" -#include "lib/smbclient/Mutex.hxx" #include "../InputStream.hxx" #include "../InputPlugin.hxx" #include "../MaybeBufferedInputStream.hxx" @@ -47,7 +46,6 @@ public: } ~SmbclientInputStream() override { - const std::lock_guard<Mutex> lock(smbclient_mutex); ctx.Close(handle); } @@ -87,8 +85,6 @@ input_smbclient_open(const char *uri, { auto ctx = SmbclientContext::New(); - const std::lock_guard<Mutex> protect(smbclient_mutex); - SMBCFILE *handle = ctx.OpenReadOnly(uri); if (handle == nullptr) throw MakeErrno("smbc_open() failed"); @@ -111,7 +107,6 @@ SmbclientInputStream::Read(std::unique_lock<Mutex> &, { const ScopeUnlock unlock(mutex); - const std::lock_guard<Mutex> lock(smbclient_mutex); nbytes = ctx.Read(handle, ptr, read_size); } @@ -130,7 +125,6 @@ SmbclientInputStream::Seek(std::unique_lock<Mutex> &, { const ScopeUnlock unlock(mutex); - const std::lock_guard<Mutex> lock(smbclient_mutex); result = ctx.Seek(handle, new_offset); } |