}
const char* D2Process::getShutdownTypeStr(const ShutdownType& type) {
- const char* str = "invalid";
+ const char* str;
switch (type) {
case SD_NORMAL:
str = "normal";
str = "now";
break;
default:
+ str = "invalid";
break;
}
wthread_->clearReady(WatchedThread::TERMINATE);
if (accept_partner1 >= 0) {
close(accept_partner1);
- accept_partner1 = -1;
}
if (accept_partner2 >= 0) {
close(accept_partner2);
- accept_partner2 = -1;
}
for (auto reader : readers) {
if (!reader.second) {
LibDHCP::commitRuntimeOptionDefs();
options.clear();
- offset = 0;
ASSERT_NO_THROW(offset = LibDHCP::unpackOptions4(buf, space,
options, deferred, true));
return (next);
}
- valid = false;
getPoolState(*it)->resetLastAllocated();
}
// We hit pool boundary, let's try to jump to the next pool and try again
return (next);
}
- valid = false;
getPoolState(*it)->resetLastAllocated();
}
// We hit pool boundary, let's try to jump to the next pool and try again
size_t need_bytes = expected_size_ - wire_size;
size_t copy_bytes = (need_bytes <= bytes_left ? need_bytes : bytes_left);
wire_data_.insert(wire_data_.end(), bufptr, bufptr + copy_bytes);
- bytes_left -= copy_bytes;
+ // bytes_left -= copy_bytes; // Since we break, we don't need to do this anymore.
bytes_used += copy_bytes;
break;
}