From: Thomas Jarosch Date: Fri, 17 Sep 2010 14:52:19 +0000 (+0200) Subject: Adapt to boost 1.44.0 X-Git-Tag: v1.1~94 X-Git-Url: http://developer.intra2net.com/git/?p=bpdyndnsd;a=commitdiff_plain;h=83a271a9d23f7219c42a5758bf849b57bfcc3cd7 Adapt to boost 1.44.0 --- diff --git a/src/tcp_service.cpp b/src/tcp_service.cpp index 96846b0..88fff59 100644 --- a/src/tcp_service.cpp +++ b/src/tcp_service.cpp @@ -104,13 +104,13 @@ std::string TCPService::read_from_socket() // Is blocking until all available data was read or buffer is full size_t bytes_read = boost::asio::read(*Socket.get(),stream_buffer,boost::asio::transfer_at_least(1),error_code); /*lint !e747 */ if ( error_code == boost::asio::error::eof ) - throw boost::system::system_error(boost::system::error_code(ECONNABORTED,boost::system::system_category),"Connection closed by peer."); + throw boost::system::system_error(boost::system::error_code(ECONNABORTED,boost::system::system_category()),"Connection closed by peer."); else if (error_code) throw boost::system::system_error(error_code); else if ( bytes_read == stream_buffer.max_size() ) - throw boost::system::system_error(boost::system::error_code(ENOBUFS,boost::system::system_category),"Could not read all available data into streambuf."); + throw boost::system::system_error(boost::system::error_code(ENOBUFS,boost::system::system_category()),"Could not read all available data into streambuf."); else if ( bytes_read == 0 ) - throw boost::system::system_error(boost::system::error_code(ENODATA,boost::system::system_category),"No data available on socket."); + throw boost::system::system_error(boost::system::error_code(ENODATA,boost::system::system_category()),"No data available on socket."); // Copy data from stream buffer to a constant buffer and create a string object from the constant buffer boost::asio::streambuf::const_buffers_type const_buffer = stream_buffer.data(); @@ -142,7 +142,7 @@ void TCPService::write_to_socket(const string& data) if (error_code) throw boost::system::system_error(error_code); else if ( bytes_wrote != data_size ) - throw boost::system::system_error(boost::system::error_code(ENOBUFS,boost::system::system_category),"Could not write all data to the socket."); + throw boost::system::system_error(boost::system::error_code(ENOBUFS,boost::system::system_category()),"Could not write all data to the socket."); return; }