mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[1470] Qualify "error_code"
One compiler had a problem with the unqualifier data type "error_code". This has been changed to "asio::error_code".
This commit is contained in:
@@ -70,7 +70,7 @@ TCPServer::TCPServer(io_service& io_service,
|
||||
}
|
||||
|
||||
void
|
||||
TCPServer::operator()(error_code ec, size_t length) {
|
||||
TCPServer::operator()(asio::error_code ec, size_t length) {
|
||||
/// Because the coroutine reentry block is implemented as
|
||||
/// a switch statement, inline variable declarations are not
|
||||
/// permitted. Certain variables used below can be declared here.
|
||||
|
@@ -169,8 +169,10 @@ public:
|
||||
/// sent with the correct QID.
|
||||
/// \param length Amount of data received.
|
||||
void udpReceiveHandler(udp::endpoint* remote, udp::socket* socket,
|
||||
error_code ec = error_code(), size_t length = 0,
|
||||
bool bad_qid = false, bool second_send = false) {
|
||||
asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0, bool bad_qid = false,
|
||||
bool second_send = false)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "udpReceiveHandler(): error = " << ec.value() <<
|
||||
", length = " << length << endl;
|
||||
@@ -218,7 +220,8 @@ public:
|
||||
///
|
||||
/// \param socket Socket on which data will be received
|
||||
/// \param ec Boost error code, value should be zero.
|
||||
void tcpAcceptHandler(tcp::socket* socket, error_code ec = error_code())
|
||||
void tcpAcceptHandler(tcp::socket* socket,
|
||||
asio::error_code ec = asio::error_code())
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "tcpAcceptHandler(): error = " << ec.value() << endl;
|
||||
@@ -257,7 +260,8 @@ public:
|
||||
/// \param ec ASIO error code, completion code of asynchronous I/O issued
|
||||
/// by the "server" to receive data.
|
||||
/// \param length Amount of data received.
|
||||
void tcpReceiveHandler(tcp::socket* socket, error_code ec = error_code(),
|
||||
void tcpReceiveHandler(tcp::socket* socket,
|
||||
asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
@@ -386,7 +390,8 @@ public:
|
||||
/// \param ec Boost error code, value should be zero.
|
||||
/// \param length Number of bytes sent.
|
||||
void tcpSendHandler(size_t expected, tcp::socket* socket,
|
||||
error_code ec = error_code(), size_t length = 0)
|
||||
asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "tcpSendHandler(): error = " << ec.value() <<
|
||||
|
@@ -170,7 +170,7 @@ UDPServer::UDPServer(io_service& io_service, const ip::address& addr,
|
||||
/// The function operator is implemented with the "stackless coroutine"
|
||||
/// pattern; see internal/coroutine.h for details.
|
||||
void
|
||||
UDPServer::operator()(error_code ec, size_t length) {
|
||||
UDPServer::operator()(asio::error_code ec, size_t length) {
|
||||
/// Because the coroutine reentry block is implemented as
|
||||
/// a switch statement, inline variable declarations are not
|
||||
/// permitted. Certain variables used below can be declared here.
|
||||
|
@@ -38,7 +38,7 @@ namespace asiolink {
|
||||
// XXX: we cannot simply construct the address in the initialization list,
|
||||
// because we'd like to throw our own exception on failure.
|
||||
IOAddress::IOAddress(const string& address_str) {
|
||||
error_code err;
|
||||
asio::error_code err;
|
||||
asio_address_ = ip::address::from_string(address_str, err);
|
||||
if (err) {
|
||||
isc_throw(IOError, "Failed to convert string to address '"
|
||||
|
@@ -275,7 +275,9 @@ public:
|
||||
/// \param ec ASIO error code, completion code of asynchronous I/O issued
|
||||
/// by the "server" to receive data.
|
||||
/// \param length Amount of data received.
|
||||
void udpReceiveHandler(error_code ec = error_code(), size_t length = 0) {
|
||||
void udpReceiveHandler(asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "udpReceiveHandler(): error = " << ec.value() <<
|
||||
", length = " << length << ", last state = " << last_ <<
|
||||
@@ -368,7 +370,9 @@ public:
|
||||
///
|
||||
/// \param ec Completion error code of the send.
|
||||
/// \param length Actual number of bytes sent.
|
||||
void udpSendHandler(error_code ec = error_code(), size_t length = 0) {
|
||||
void udpSendHandler(asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "udpSendHandler(): error = " << ec.value() <<
|
||||
", length = " << length << endl;
|
||||
@@ -392,7 +396,9 @@ public:
|
||||
///
|
||||
/// \param socket Socket on which data will be received
|
||||
/// \param ec Boost error code, value should be zero.
|
||||
void tcpAcceptHandler(error_code ec = error_code(), size_t length = 0) {
|
||||
void tcpAcceptHandler(asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "tcpAcceptHandler(): error = " << ec.value() <<
|
||||
", length = " << length << endl;
|
||||
@@ -419,7 +425,9 @@ public:
|
||||
/// \param ec ASIO error code, completion code of asynchronous I/O issued
|
||||
/// by the "server" to receive data.
|
||||
/// \param length Amount of data received.
|
||||
void tcpReceiveHandler(error_code ec = error_code(), size_t length = 0) {
|
||||
void tcpReceiveHandler(asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
cout << "tcpReceiveHandler(): error = " << ec.value() <<
|
||||
", length = " << length <<
|
||||
@@ -506,7 +514,8 @@ public:
|
||||
/// \param expected_length Number of bytes that were expected to have been sent.
|
||||
/// \param ec Boost error code, value should be zero.
|
||||
/// \param length Number of bytes sent.
|
||||
void tcpSendHandler(size_t expected_length = 0, error_code ec = error_code(),
|
||||
void tcpSendHandler(size_t expected_length = 0,
|
||||
asio::error_code ec = asio::error_code(),
|
||||
size_t length = 0)
|
||||
{
|
||||
if (debug_) {
|
||||
|
Reference in New Issue
Block a user