Fix duplicate name of _mutex in ExceptionStore and some of its children.
[dcpomatic.git] / src / lib / server_finder.cc
index 3eec6597b55df1d92125b1785ad2998a104adb33..315d8d79dadc00b5d8cb87363b8a2e59b3929c0d 100644 (file)
@@ -22,6 +22,7 @@
 #include "util.h"
 #include "config.h"
 #include "cross.h"
+#include "server_description.h"
 #include "dcpomatic_socket.h"
 #include "raw_convert.h"
 #include <libcxml/cxml.h>
@@ -167,7 +168,7 @@ ServerFinder::handle_accept (boost::system::error_code ec, shared_ptr<Socket> so
        if (!server_found (ip) && xml->optional_number_child<int>("Version").get_value_or (0) == SERVER_LINK_VERSION) {
                ServerDescription sd (ip, xml->number_child<int> ("Threads"));
                {
-                       boost::mutex::scoped_lock lm (_mutex);
+                       boost::mutex::scoped_lock lm (_servers_mutex);
                        _servers.push_back (sd);
                }
                emit (boost::bind (boost::ref (ServersListChanged)));
@@ -179,7 +180,7 @@ ServerFinder::handle_accept (boost::system::error_code ec, shared_ptr<Socket> so
 bool
 ServerFinder::server_found (string ip) const
 {
-       boost::mutex::scoped_lock lm (_mutex);
+       boost::mutex::scoped_lock lm (_servers_mutex);
        list<ServerDescription>::const_iterator i = _servers.begin();
        while (i != _servers.end() && i->host_name() != ip) {
                ++i;
@@ -208,7 +209,7 @@ ServerFinder::drop ()
 list<ServerDescription>
 ServerFinder::servers () const
 {
-       boost::mutex::scoped_lock lm (_mutex);
+       boost::mutex::scoped_lock lm (_servers_mutex);
        return _servers;
 }
 
@@ -217,7 +218,7 @@ ServerFinder::config_changed (Config::Property what)
 {
        if (what == Config::USE_ANY_SERVERS || what == Config::SERVERS) {
                {
-                       boost::mutex::scoped_lock lm (_mutex);
+                       boost::mutex::scoped_lock lm (_servers_mutex);
                        _servers.clear ();
                }
                ServersListChanged ();