diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-03 05:47:35 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-03 05:47:35 +0100 |
commit | 4f20bf987a942e66d8c2ed97df8c3da71d6f17ec (patch) | |
tree | e92557e6594054461be9a981c29be719d44f51ce /server | |
parent | fe18eeff63a33d0dffcbac574986e8b4aa142047 (diff) |
Fixed error_code in Connection::handle_read().
Diffstat (limited to 'server')
-rw-r--r-- | server/connection.cpp | 6 | ||||
-rw-r--r-- | server/connection.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/server/connection.cpp b/server/connection.cpp index 3286aa3..1e38f7b 100644 --- a/server/connection.cpp +++ b/server/connection.cpp @@ -6,9 +6,9 @@ Connection::Connection(boost::asio::io_service& io_service) : socket(io_service) } -void Connection::handle_read(uint8_t* data, std::size_t bytes, const boost::system::error_code& error) { - if(error) { - error(); +void Connection::handle_read(uint8_t* data, std::size_t bytes, const boost::system::error_code& error_code) { + if(error_code) { + error("Read error."); return; } diff --git a/server/connection.h b/server/connection.h index 248817b..b51a67f 100644 --- a/server/connection.h +++ b/server/connection.h @@ -20,7 +20,7 @@ class Connection : public ConnectionBase, public boost::enable_shared_from_this< Connection(boost::asio::io_service& io_service); //! Callback for when data is read. - void handle_read(uint8_t* data, std::size_t bytes, const boost::system::error_code& error); + void handle_read(uint8_t* data, std::size_t bytes, const boost::system::error_code& error_code); //! Callback for when data is written. void handle_write(); |