Fixes a compilation issue of ANA with Boost 1.44 and above...

...due to changes in the system library by introducing a generic
error, see http://www.boost.org/users/news/version_1_44_0.
This commit is contained in:
Guillermo Biset 2010-08-19 20:13:28 +00:00
parent 1159fdf158
commit 638d87c817
4 changed files with 9 additions and 12 deletions

View file

@ -85,6 +85,10 @@ namespace ana
const ana::error_code timeout_error =
boost::asio::error::make_error_code( boost::asio::error::timed_out );
/** A generic error. Used to describe an undefined error. */
const ana::error_code generic_error =
boost::asio::error::make_error_code( boost::asio::error::fault );
/** A network operation that didn't do anything. */
const operation_id no_operation = 0;

View file

@ -198,8 +198,7 @@ void asio_client::connect( ana::connection_handler* handler )
}
catch (const std::exception& e)
{
inform_connection_result( handler,
boost::system::error_code(1,boost::system::system_category ));
inform_connection_result( handler, ana::generic_error );
}
}

View file

@ -268,7 +268,7 @@ void asio_listener::listen_one_message()
}
catch(const std::exception& e)
{
disconnect( boost::system::error_code(1,boost::system::system_category) );
disconnect( ana::generic_error );
}
}

View file

@ -153,15 +153,11 @@ void proxy_connection::handle_response(boost::asio::streambuf* buf,
do_connect( );
}
else //TODO: digest authentication support here
manager_->handle_proxy_connection(
boost::system::error_code(1,boost::system::system_category ),
conn_handler_, timer_);
manager_->handle_proxy_connection( ana::generic_error, conn_handler_, timer_);
}
else //Can't connect, wrong password or wasn't offered the possibility to authenticate
manager_->handle_proxy_connection(
boost::system::error_code(1,boost::system::system_category ),
conn_handler_, timer_);
manager_->handle_proxy_connection( ana::generic_error, conn_handler_, timer_);
}
}
}
@ -230,9 +226,7 @@ void proxy_connection::do_connect()
}
catch (const std::exception& e)
{
manager_->handle_proxy_connection(
boost::system::error_code(1,boost::system::system_category),
conn_handler_, timer_ );
manager_->handle_proxy_connection(ana::generic_error, conn_handler_, timer_ );
}
}