From 416f7c26009b11e12254261a02d925c824fbc154 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 18 Jan 2014 13:04:01 +0100 Subject: db/upnp: don't hold mutex while downloading device description Must not perform blocking I/O while holding a mutex. --- src/db/upnp/Discovery.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/upnp/Discovery.cxx b/src/db/upnp/Discovery.cxx index ad63530db..89ece3dfd 100644 --- a/src/db/upnp/Discovery.cxx +++ b/src/db/upnp/Discovery.cxx @@ -61,7 +61,6 @@ UPnPDeviceDirectory::discoExplorer() return; } - const ScopeLock protect(mutex); // Device signals its existence and well-being. Perform the // UPnP "description" phase by downloading and decoding the // description document. @@ -81,6 +80,7 @@ UPnPDeviceDirectory::discoExplorer() continue; } + const ScopeLock protect(mutex); #if defined(__clang__) || GCC_CHECK_VERSION(4,8) auto e = directories.emplace(tsk->deviceId, d); #else -- cgit v1.2.3