#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>
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)));
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;
list<ServerDescription>
ServerFinder::servers () const
{
- boost::mutex::scoped_lock lm (_mutex);
+ boost::mutex::scoped_lock lm (_servers_mutex);
return _servers;
}
{
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 ();