if (v4) {
Lease4Parser parser;
lease4 = parser.parse(config, cmd_args_, force_create);
-
if (lease4) {
bool success;
if (!MultiThreadingMgr::instance().getMode()) {
+ // Not multi-threading.
success = LeaseMgrFactory::instance().addLease(lease4);
} else {
// Multi-threading, try to lock first to avoid a race.
// The parser does sanity checks (if the address is in scope, if
// subnet-id is valid, etc)
lease6 = parser.parse(config, cmd_args_, force_create);
- bool added;
+ bool added = false;
if (!MultiThreadingMgr::instance().getMode()) {
// Not multi-threading.
added = addOrUpdate6(lease6, force_create);
EXPECT_TRUE(lmptr_->getLease6(Lease::TYPE_NA, IOAddress("2001:db8:1::123")));
EXPECT_TRUE(lmptr_->getLease6(Lease::TYPE_NA, IOAddress("2001:db8:1::124")));
- // Check that the lease for 2001:db8:2::123 was not added.
+ // Check that the lease for locked address was not added.
EXPECT_FALSE(lmptr_->getLease6(Lease::TYPE_NA, locked_addr));
auto args = rsp->get("arguments");