Ticket #2103: recursive_query_unittest_3.cc.diff

File recursive_query_unittest_3.cc.diff, 2.6 KB (added by fdupont, 8 years ago)

error_code -> asio::error_code fix

  • src/lib/resolve/tests/recursive_query_unittest_3.cc

    diff --git a/src/lib/resolve/tests/recursive_query_unittest_3.cc b/src/lib/resolve/tests/recursive_query_unittest_3.cc
    index 1104680..687577f 100644
    a b public: 
    207207    /// \param ec ASIO error code, completion code of asynchronous I/O issued
    208208    ///        by the "server" to receive data.
    209209    /// \param length Amount of data received.
    210     void udpReceiveHandler(error_code ec = error_code(), size_t length = 0) {
     210    void udpReceiveHandler(asio::error_code ec = asio::error_code(),
     211                           size_t length = 0) {
    211212        // Expected state should be one greater than the last state.
    212213        EXPECT_EQ(static_cast<int>(expected_), static_cast<int>(last_) + 1);
    213214        last_ = expected_;
    public: 
    270271    ///
    271272    /// \param ec Completion error code of the send.
    272273    /// \param length Actual number of bytes sent.
    273     void udpSendHandler(error_code ec = error_code(), size_t length = 0) {
     274    void udpSendHandler(asio::error_code ec = asio::error_code(),
     275                        size_t length = 0) {
    274276        // Check send was OK
    275277        EXPECT_EQ(0, ec.value());
    276278        EXPECT_EQ(udp_length_, length);
    public: 
    290292    ///
    291293    /// \param socket Socket on which data will be received
    292294    /// \param ec Boost error code, value should be zero.
    293     void tcpAcceptHandler(error_code ec = error_code(), size_t length = 0) {
     295    void tcpAcceptHandler(asio::error_code ec = asio::error_code(),
     296                          size_t length = 0) {
    294297        // Expect that the accept completed without a problem.
    295298        EXPECT_EQ(0, ec.value());
    296299
    public: 
    312315    /// \param ec ASIO error code, completion code of asynchronous I/O issued
    313316    ///        by the "server" to receive data.
    314317    /// \param length Amount of data received.
    315     void tcpReceiveHandler(error_code ec = error_code(), size_t length = 0) {
     318    void tcpReceiveHandler(asio::error_code ec = asio::error_code(),
     319                           size_t length = 0) {
    316320        // Expect that the receive completed without a problem.
    317321        EXPECT_EQ(0, ec.value());
    318322
    public: 
    398402    /// \param ec Boost error code, value should be zero.
    399403    /// \param length Number of bytes sent.
    400404    void tcpSendHandler(size_t expected_length = 0,
    401                         error_code ec = error_code(),
     405                        asio::error_code ec = asio::error_code(),
    402406                        size_t length = 0)
    403407    {
    404408        EXPECT_EQ(0, ec.value());       // Expect no error