#include "dcpomatic_socket.h"
#include <dcp/raw_convert.h>
#include <libcxml/cxml.h>
+#include <boost/bind/placeholders.hpp>
#include <boost/lambda/lambda.hpp>
#include <iostream>
using boost::scoped_array;
using boost::weak_ptr;
using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using dcp::raw_convert;
EncodeServerFinder* EncodeServerFinder::_instance = 0;
}
/* Query our `definite' servers (if there are any) */
- vector<string> servers = Config::instance()->servers ();
- for (vector<string>::const_iterator i = servers.begin(); i != servers.end(); ++i) {
- if (server_found (*i)) {
+ BOOST_FOREACH (string const& i, Config::instance()->servers()) {
+ if (server_found(i)) {
/* Don't bother asking a server that we already know about */
continue;
}
try {
boost::asio::ip::udp::resolver resolver (io_service);
- boost::asio::ip::udp::resolver::query query (*i, raw_convert<string> (HELLO_PORT));
+ boost::asio::ip::udp::resolver::query query (i, raw_convert<string> (HELLO_PORT));
boost::asio::ip::udp::endpoint end_point (*resolver.resolve (query));
socket.send_to (boost::asio::buffer (data.c_str(), data.size() + 1), end_point);
} catch (...) {