// Set the data directory for server id file.
if (global->contains("data-directory")) {
- CfgMgr::instance().setDataDir(getString(global, "data-directory"),
- false);
+ CfgMgr::instance().setDataDir(getString(global, "data-directory"),
+ false);
}
// Set the probation period for decline handling.
configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
bool check_only) {
if (!config_set) {
- ConstElementPtr answer = isc::config::createAnswer(1,
+ ConstElementPtr answer = isc::config::createAnswer(CONTROL_RESULT_ERROR,
string("Can't parse NULL config"));
return (answer);
}
} catch (const isc::Exception& ex) {
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_FAIL)
.arg(parameter_name).arg(ex.what());
- answer = isc::config::createAnswer(1, ex.what());
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
// An error occurred, so make sure that we restore original data.
rollback = true;
} catch (...) {
// For things like bad_cast in boost::lexical_cast
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_EXCEPTION).arg(parameter_name);
- answer = isc::config::createAnswer(1, "undefined configuration"
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, "undefined configuration"
" processing error");
// An error occurred, so make sure that we restore original data.
if (check_only) {
rollback = true;
if (!answer) {
- answer = isc::config::createAnswer(0,
+ answer = isc::config::createAnswer(CONTROL_RESULT_SUCCESS,
"Configuration seems sane. Control-socket, hook-libraries, and D2 "
"configuration were sanity checked, but not applied.");
}
}
catch (const isc::Exception& ex) {
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_COMMIT_FAIL).arg(ex.what());
- answer = isc::config::createAnswer(2, ex.what());
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, ex.what());
// An error occurred, so make sure to restore the original data.
rollback = true;
} catch (...) {
// For things like bad_cast in boost::lexical_cast
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_COMMIT_EXCEPTION);
- answer = isc::config::createAnswer(2, "undefined configuration"
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, "undefined configuration"
" parsing error");
// An error occurred, so make sure to restore the original data.
std::ostringstream err;
err << "during update from config backend database: " << ex.what();
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_COMMIT_FAIL).arg(err.str());
- answer = isc::config::createAnswer(2, err.str());
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, err.str());
// An error occurred, so make sure to restore the original data.
rollback = true;
err << "during update from config backend database: "
<< "undefined configuration parsing error";
LOG_ERROR(dhcp6_logger, DHCP6_PARSER_COMMIT_FAIL).arg(err.str());
- answer = isc::config::createAnswer(2, err.str());
+ answer = isc::config::createAnswer(CONTROL_RESULT_ERROR, err.str());
// An error occurred, so make sure to restore the original data.
rollback = true;
getConfigSummary(SrvConfig::CFGSEL_ALL6));
// Everything was fine. Configuration is successful.
- answer = isc::config::createAnswer(0, "Configuration successful.");
+ answer = isc::config::createAnswer(CONTROL_RESULT_SUCCESS, "Configuration successful.");
return (answer);
}