Adapt to boost 1.44.0
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 17 Sep 2010 14:52:19 +0000 (16:52 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Fri, 17 Sep 2010 14:52:19 +0000 (16:52 +0200)
src/tcp_service.cpp

index 96846b0..88fff59 100644 (file)
@@ -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;
 }