]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1470] Qualify "error_code"
authorStephen Morris <stephen@isc.org>
Mon, 12 Dec 2011 15:39:41 +0000 (15:39 +0000)
committerStephen Morris <stephen@isc.org>
Mon, 12 Dec 2011 15:39:41 +0000 (15:39 +0000)
One compiler had a problem with the unqualifier data type
"error_code".  This has been changed to "asio::error_code".

src/lib/asiodns/tcp_server.cc
src/lib/asiodns/tests/io_fetch_unittest.cc
src/lib/asiodns/udp_server.cc
src/lib/asiolink/io_address.cc
src/lib/resolve/tests/recursive_query_unittest_2.cc

index f91eb3293ba9dde8c2e12f81b8517e5107872fd6..2606a21aa9ece582382c68c63e0d905054eba94e 100644 (file)
@@ -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.
index 52a51a14d2b06df9da31c259edb955aef6a1dde6..936c6c73548a4c6eb50860bd7c2ded963a61c9bb 100644 (file)
@@ -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() <<
index f103e5a94ce6226d3633f8a23061987a6ab3ce49..72db2bfe8d3bd8afadc9aab8e269ed92d55220f2 100644 (file)
@@ -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.
index 0fe1db45be312d836b08e0e182c74b6cbf5596af..370e8f5af7140acc140263fd5a32057242f6ec57 100644 (file)
@@ -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 '"
index 3e62336d5e223cb2046db2afca96e9409bbeea47..ba93bd845bec9c3ee937dae9a64376794abb3ffe 100644 (file)
@@ -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_) {