Fixes for compilation from Jenkins

This commit is contained in:
bernatx 2022-07-20 17:00:48 +02:00 committed by bernat
parent f6d1bfbb91
commit e48a88275f
4 changed files with 8 additions and 13 deletions

View File

@ -104,23 +104,18 @@ namespace multigpu {
return; return;
} }
auto handle_sent = [weak](const boost::system::error_code &ec, size_t DEBUG_ONLY(bytes)) {
// auto self = weak.lock();
// if (!self) return;
};
// sent first size buffer // sent first size buffer
self->_deadline.expires_from_now(self->_timeout); self->_deadline.expires_from_now(self->_timeout);
int this_size = text.size(); int this_size = text.size();
boost::asio::async_write( boost::asio::async_write(
self->_socket, self->_socket,
boost::asio::buffer(&this_size, sizeof(this_size)), boost::asio::buffer(&this_size, sizeof(this_size)),
boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &ec, size_t bytes){ })); boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &, size_t bytes){ }));
// send characters // send characters
boost::asio::async_write( boost::asio::async_write(
self->_socket, self->_socket,
boost::asio::buffer(text.c_str(), text.size()), boost::asio::buffer(text.c_str(), text.size()),
boost::asio::bind_executor(self->_strand, handle_sent)); boost::asio::bind_executor(self->_strand, [](const boost::system::error_code &, size_t bytes){ }));
}); });
} }

View File

@ -31,7 +31,7 @@ void PrimaryCommands::SendFrameData(carla::Buffer buffer) {
} }
// broadcast to all secondary servers the map to load // broadcast to all secondary servers the map to load
void PrimaryCommands::SendLoadMap(std::string map) { void PrimaryCommands::SendLoadMap(std::string) {
// carla::Buffer buf((unsigned char *) map.c_str(), (size_t) map.size()); // carla::Buffer buf((unsigned char *) map.c_str(), (size_t) map.size());
log_info("sending load map command"); log_info("sending load map command");
} }

View File

@ -66,7 +66,7 @@ namespace multigpu {
boost::asio::ip::tcp::endpoint _endpoint; boost::asio::ip::tcp::endpoint _endpoint;
std::vector<std::shared_ptr<Primary>> _sessions; std::vector<std::shared_ptr<Primary>> _sessions;
std::shared_ptr<Listener> _listener; std::shared_ptr<Listener> _listener;
int _next; uint _next;
std::unordered_map<Primary *, std::shared_ptr<std::promise<SessionInfo>>> _promises; std::unordered_map<Primary *, std::shared_ptr<std::promise<SessionInfo>>> _promises;
PrimaryCommands _commander; PrimaryCommands _commander;
}; };

View File

@ -28,11 +28,11 @@ namespace multigpu {
boost::asio::ip::tcp::endpoint ep, boost::asio::ip::tcp::endpoint ep,
SecondaryCommands::callback_type callback) : SecondaryCommands::callback_type callback) :
_pool(), _pool(),
_endpoint(ep),
_buffer_pool(std::make_shared<BufferPool>()),
_socket(_pool.io_context()), _socket(_pool.io_context()),
_endpoint(ep),
_strand(_pool.io_context()), _strand(_pool.io_context()),
_connection_timer(_pool.io_context()) { _connection_timer(_pool.io_context()),
_buffer_pool(std::make_shared<BufferPool>()) {
_commander.set_callback(callback); _commander.set_callback(callback);
} }