]> git.pld-linux.org Git - packages/OpenSceneGraph.git/blame - OpenSceneGraph-asio.patch
- bcond to disable ffmpeg support, rel 2
[packages/OpenSceneGraph.git] / OpenSceneGraph-asio.patch
CommitLineData
8d929887
JB
1diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp
2--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/connection.cpp 2020-01-31 12:03:07.000000000 +0100
3+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/connection.cpp 2022-11-13 19:16:22.452241561 +0100
4@@ -10,7 +10,6 @@
5
6 #include "connection.hpp"
7 #include <vector>
8-#include <boost/bind.hpp>
9 #include "request_handler.hpp"
10 #include <osg/Notify>
11
12@@ -39,9 +38,9 @@ void connection::start()
13 OSG_DEBUG << "RestHttpDevice :: connection::start" << std::endl;
14
15 socket_.async_read_some(asio::buffer(buffer_),
16- boost::bind(&connection::handle_read, shared_from_this(),
17- asio::placeholders::error,
18- asio::placeholders::bytes_transferred));
19+ std::bind(&connection::handle_read, shared_from_this(),
20+ std::placeholders::_1,
21+ std::placeholders::_2));
22 }
23
24 void connection::handle_read(const asio::error_code& e,
25@@ -57,22 +56,22 @@ void connection::handle_read(const asio:
26 {
27 request_handler_.handle_request(request_, reply_);
28 asio::async_write(socket_, reply_.to_buffers(),
29- boost::bind(&connection::handle_write, shared_from_this(),
30- asio::placeholders::error));
31+ std::bind(&connection::handle_write, shared_from_this(),
32+ std::placeholders::_1));
33 }
34 else if (!result)
35 {
36 reply_ = reply::stock_reply(reply::bad_request);
37 asio::async_write(socket_, reply_.to_buffers(),
38- boost::bind(&connection::handle_write, shared_from_this(),
39- asio::placeholders::error));
40+ std::bind(&connection::handle_write, shared_from_this(),
41+ std::placeholders::_1));
42 }
43 else
44 {
45 socket_.async_read_some(asio::buffer(buffer_),
46- boost::bind(&connection::handle_read, shared_from_this(),
47- asio::placeholders::error,
48- asio::placeholders::bytes_transferred));
49+ std::bind(&connection::handle_read, shared_from_this(),
50+ std::placeholders::_1,
51+ std::placeholders::_2));
52 }
53 }
54
55diff -rupN --no-dereference OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp
56--- OpenSceneGraph-OpenSceneGraph-3.6.5/src/osgPlugins/RestHttpDevice/server.cpp 2020-01-31 12:03:07.000000000 +0100
57+++ OpenSceneGraph-OpenSceneGraph-3.6.5-new/src/osgPlugins/RestHttpDevice/server.cpp 2022-11-13 19:16:22.452241561 +0100
58@@ -9,7 +9,6 @@
59 //
60
61 #include "server.hpp"
62-#include <boost/bind.hpp>
63
64 namespace http {
65 namespace server {
66@@ -23,7 +22,7 @@ server::server(const std::string& addres
41ae154e
JB
67 request_handler_(doc_root)
68 {
69 // Open the acceptor with the option to reuse the address (i.e. SO_REUSEADDR).
70- asio::ip::tcp::resolver resolver(acceptor_.get_io_service());
8d929887 71+ asio::ip::tcp::resolver resolver(acceptor_.get_executor());
41ae154e
JB
72 asio::ip::tcp::resolver::query query(address, port);
73 asio::ip::tcp::endpoint endpoint = *resolver.resolve(query);
74 acceptor_.open(endpoint.protocol());
8d929887
JB
75@@ -31,8 +30,8 @@ server::server(const std::string& addres
76 acceptor_.bind(endpoint);
77 acceptor_.listen();
78 acceptor_.async_accept(new_connection_->socket(),
79- boost::bind(&server::handle_accept, this,
80- asio::placeholders::error));
81+ std::bind(&server::handle_accept, this,
82+ std::placeholders::_1));
83 }
84
85 void server::run()
86@@ -56,8 +55,8 @@ void server::handle_accept(const asio::e
87 new_connection_.reset(new connection(
88 io_service_pool_.get_io_service(), request_handler_));
89 acceptor_.async_accept(new_connection_->socket(),
90- boost::bind(&server::handle_accept, this,
91- asio::placeholders::error));
92+ std::bind(&server::handle_accept, this,
93+ std::placeholders::_1));
94 }
95 else
96 {
This page took 0.128774 seconds and 4 git commands to generate.