Commit ab54494a authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[805] Make it compile and check after merge

parent f68758a5
......@@ -170,7 +170,7 @@ main(int argc, char* argv[]) {
my_command_handler, false);
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_CONFIG_CHANNEL_ESTABLISHED);
// Initialize the Socket Requestor
isc::server_common::SocketRequestor::init(*config_session);
isc::server_common::initSocketReqeustor(*config_session);
xfrin_session = new Session(io_service.get_io_service());
LOG_DEBUG(auth_logger, DBG_AUTH_START, AUTH_XFRIN_CHANNEL_CREATED);
......
......@@ -211,7 +211,7 @@ main(int argc, char* argv[]) {
config_session = new ModuleCCSession(specfile, *cc_session,
my_config_handler,
my_command_handler);
isc::server_common::SocketRequestor::init(*config_session);
isc::server_common::initSocketReqeustor(*config_session);
LOG_DEBUG(resolver_logger, RESOLVER_DBG_INIT, RESOLVER_CONFIG_CHANNEL);
// FIXME: This does not belong here, but inside Boss
......
......@@ -64,7 +64,8 @@ using isc::UnitTestUtil;
namespace {
const char* const TEST_ADDRESS = "127.0.0.1";
const char* const TEST_PORT = "53530";
const char* const TEST_ADDRESS_FAIL = "192.0.2.2";
const char* const TEST_PORT = "53210";
// An internal exception class
class TestConfigError : public isc::Exception {
......@@ -254,7 +255,7 @@ TEST_F(ResolverConfig, listenOnConfigFail) {
"\"listen_on\": ["
" {"
" \"address\": \"" +
string(TEST_ADDRESS) + "\","
string(TEST_ADDRESS_FAIL) + "\","
" \"port\": " +
string(TEST_PORT) + "}]}"));
configAnswerCheck(server.updateConfig(config), false);
......@@ -270,7 +271,7 @@ TEST_F(ResolverConfig, listenOnAndOtherConfig) {
" {\"address\": \"192.0.2.1\","
" \"port\": 53}], "
"\"listen_on\": ["
" {\"address\": \"" + string(TEST_ADDRESS) + "\","
" {\"address\": \"" + string(TEST_ADDRESS_FAIL) + "\","
" \"port\": " + string(TEST_PORT) + "}]}");
// Normally, if listen_on fails the rest of the config parameters will
// be ignored.
......
......@@ -228,9 +228,9 @@ getSocketFd(const std::string& token, int sock_pass_fd) {
// check for error values of passed_sock_fd (see fd_share.h)
if (passed_sock_fd < 0) {
switch (passed_sock_fd) {
case isc::util::io::FD_COMM_ERROR:
case isc::util::io::FD_SYSTEM_ERROR:
isc_throw(SocketRequestor::SocketError,
"FD_COMM_ERROR while requesting socket");
"FD_SYSTEM_ERROR while requesting socket");
break;
case isc::util::io::FD_OTHER_ERROR:
isc_throw(SocketRequestor::SocketError,
......
......@@ -66,7 +66,7 @@ public:
expect_port_(expect_port)
{
// Prepare the requestor (us) for the test
SocketRequestor::initTest(this);
server_common::initTestSocketRequestor(this);
// Don't manipulate the real sockets
server_common::portconfig::test_mode = true;
}
......@@ -82,7 +82,7 @@ public:
server_common::portconfig::AddressList list;
server_common::portconfig::installListenAddresses(list, store_, dnss_);
// Don't leave invalid pointers here
SocketRequestor::initTest(NULL);
server_common::initTestSocketRequestor(NULL);
// And return the mode
server_common::portconfig::test_mode = false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment