mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#1434] renamed members and functions
This commit is contained in:
@@ -1425,9 +1425,9 @@ public:
|
||||
valid_lft = 0;
|
||||
}
|
||||
MySqlConnection::convertFromDatabaseTime(expire_, valid_lft, cltt);
|
||||
// Update cltt_ and old_cltt_ explicitly.
|
||||
// Update cltt_ and current_cltt_ explicitly.
|
||||
result->cltt_ = cltt;
|
||||
result->old_cltt_ = cltt;
|
||||
result->current_cltt_ = cltt;
|
||||
|
||||
// Set state.
|
||||
result->state_ = state_;
|
||||
@@ -1872,9 +1872,9 @@ MySqlLeaseMgr::addLease(const Lease4Ptr& lease) {
|
||||
// ... and drop to common code.
|
||||
auto result = addLeaseCommon(ctx, INSERT_LEASE4, bind);
|
||||
|
||||
// Update lease lifetime with new values (allows update between the creation
|
||||
// Update lease current expiration time (allows update between the creation
|
||||
// of the Lease up to the point of insertion in the database).
|
||||
lease->updateExistingLifetime();
|
||||
lease->updateCurrentExpirationTime();
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -1895,9 +1895,9 @@ MySqlLeaseMgr::addLease(const Lease6Ptr& lease) {
|
||||
// ... and drop to common code.
|
||||
auto result = addLeaseCommon(ctx, INSERT_LEASE6, bind);
|
||||
|
||||
// Update lease lifetime with new values (allows update between the creation
|
||||
// Update lease current expiration time (allows update between the creation
|
||||
// of the Lease up to the point of insertion in the database).
|
||||
lease->updateExistingLifetime();
|
||||
lease->updateCurrentExpirationTime();
|
||||
|
||||
return (result);
|
||||
}
|
||||
@@ -2761,7 +2761,8 @@ MySqlLeaseMgr::updateLease4(const Lease4Ptr& lease) {
|
||||
bind.push_back(inbind[0]);
|
||||
|
||||
MYSQL_TIME expire;
|
||||
MySqlConnection::convertToDatabaseTime(lease->old_cltt_, lease->old_valid_lft_,
|
||||
MySqlConnection::convertToDatabaseTime(lease->current_cltt_,
|
||||
lease->current_valid_lft_,
|
||||
expire);
|
||||
inbind[1].buffer_type = MYSQL_TYPE_TIMESTAMP;
|
||||
inbind[1].buffer = reinterpret_cast<char*>(&expire);
|
||||
@@ -2772,8 +2773,8 @@ MySqlLeaseMgr::updateLease4(const Lease4Ptr& lease) {
|
||||
// Drop to common update code
|
||||
updateLeaseCommon(ctx, stindex, &bind[0], lease);
|
||||
|
||||
// Update lease lifetime with new values.
|
||||
lease->updateExistingLifetime();
|
||||
// Update lease current expiration time.
|
||||
lease->updateCurrentExpirationTime();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2808,7 +2809,8 @@ MySqlLeaseMgr::updateLease6(const Lease6Ptr& lease) {
|
||||
bind.push_back(inbind[0]);
|
||||
|
||||
MYSQL_TIME expire;
|
||||
MySqlConnection::convertToDatabaseTime(lease->old_cltt_, lease->old_valid_lft_,
|
||||
MySqlConnection::convertToDatabaseTime(lease->current_cltt_,
|
||||
lease->current_valid_lft_,
|
||||
expire);
|
||||
inbind[1].buffer_type = MYSQL_TYPE_TIMESTAMP;
|
||||
inbind[1].buffer = reinterpret_cast<char*>(&expire);
|
||||
@@ -2819,8 +2821,8 @@ MySqlLeaseMgr::updateLease6(const Lease6Ptr& lease) {
|
||||
// Drop to common update code
|
||||
updateLeaseCommon(ctx, stindex, &bind[0], lease);
|
||||
|
||||
// Update lease lifetime with new values.
|
||||
lease->updateExistingLifetime();
|
||||
// Update lease current expiration time.
|
||||
lease->updateCurrentExpirationTime();
|
||||
}
|
||||
|
||||
// Delete lease methods. Similar to other groups of methods, these comprise
|
||||
@@ -2866,7 +2868,8 @@ MySqlLeaseMgr::deleteLease(const Lease4Ptr& lease) {
|
||||
inbind[0].is_unsigned = MLM_TRUE;
|
||||
|
||||
MYSQL_TIME expire;
|
||||
MySqlConnection::convertToDatabaseTime(lease->old_cltt_, lease->old_valid_lft_,
|
||||
MySqlConnection::convertToDatabaseTime(lease->current_cltt_,
|
||||
lease->current_valid_lft_,
|
||||
expire);
|
||||
inbind[1].buffer_type = MYSQL_TYPE_TIMESTAMP;
|
||||
inbind[1].buffer = reinterpret_cast<char*>(&expire);
|
||||
@@ -2912,7 +2915,8 @@ MySqlLeaseMgr::deleteLease(const Lease6Ptr& lease) {
|
||||
inbind[0].length = &addr6_length;
|
||||
|
||||
MYSQL_TIME expire;
|
||||
MySqlConnection::convertToDatabaseTime(lease->old_cltt_, lease->old_valid_lft_,
|
||||
MySqlConnection::convertToDatabaseTime(lease->current_cltt_,
|
||||
lease->current_valid_lft_,
|
||||
expire);
|
||||
inbind[1].buffer_type = MYSQL_TYPE_TIMESTAMP;
|
||||
inbind[1].buffer = reinterpret_cast<char*>(&expire);
|
||||
|
Reference in New Issue
Block a user