diff options
author | Max Kellermann <max@duempel.org> | 2014-02-06 22:19:59 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-06 22:19:59 +0100 |
commit | c8f0c7e9ede1cfef49ea9d4b71b6b56b4ae87141 (patch) | |
tree | 85adef73380393703c71202f20601d99df135b00 /src/neighbor/plugins | |
parent | a7989077abe2b862b131b7573380a82f889bad95 (diff) | |
download | mpd-c8f0c7e9ede1cfef49ea9d4b71b6b56b4ae87141.tar.gz mpd-c8f0c7e9ede1cfef49ea9d4b71b6b56b4ae87141.tar.xz mpd-c8f0c7e9ede1cfef49ea9d4b71b6b56b4ae87141.zip |
*/smbclient: protect all libsmbclient calls with a mutex
libsmbclient is not thread-safe nor reentrant. We must protect all
function calls with a global mutex, unfortunately.
Diffstat (limited to 'src/neighbor/plugins')
-rw-r--r-- | src/neighbor/plugins/SmbclientNeighborPlugin.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx index 2b81f3ceb..2701b0ccd 100644 --- a/src/neighbor/plugins/SmbclientNeighborPlugin.cxx +++ b/src/neighbor/plugins/SmbclientNeighborPlugin.cxx @@ -21,6 +21,7 @@ #include "SmbclientNeighborPlugin.hxx" #include "lib/smbclient/Init.hxx" #include "lib/smbclient/Domain.hxx" +#include "lib/smbclient/Mutex.hxx" #include "neighbor/NeighborPlugin.hxx" #include "neighbor/Explorer.hxx" #include "neighbor/Listener.hxx" @@ -175,6 +176,7 @@ static NeighborExplorer::List DetectServers() { NeighborExplorer::List list; + const ScopeLock protect(smbclient_mutex); ReadServers(list, "smb://"); return list; } |