diff options
author | Marcin Siodelski <marcin@isc.org> | 2019-01-28 20:14:59 +0100 |
---|---|---|
committer | Marcin Siodelski <marcin@isc.org> | 2019-01-30 10:18:59 +0100 |
commit | 84d9d7a40155cab5ed14f63f5734a7e53b13b4cf (patch) | |
tree | 6905e24b9afc86662a24c1119e3f08ec07768844 /src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc | |
parent | [#396,!205] Use microsec precision for the CB tables. (diff) | |
download | kea-84d9d7a40155cab5ed14f63f5734a7e53b13b4cf.tar.xz kea-84d9d7a40155cab5ed14f63f5734a7e53b13b4cf.zip |
[#396,!205] Audit revision timestamp is set by Kea.
Diffstat (limited to 'src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc')
-rw-r--r-- | src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc index ff104bc5cb..29cc777440 100644 --- a/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc +++ b/src/hooks/dhcp/mysql_cb/mysql_cb_impl.cc @@ -32,7 +32,9 @@ ScopedAuditRevision::ScopedAuditRevision(MySqlConfigBackendImpl* impl, const std::string& log_message, bool cascade_transaction) : impl_(impl) { - impl_->createAuditRevision(index, server_selector, log_message, + impl_->createAuditRevision(index, server_selector, + boost::posix_time::microsec_clock::local_time(), + log_message, cascade_transaction); } @@ -86,6 +88,7 @@ MySqlConfigBackendImpl::~MySqlConfigBackendImpl() { void MySqlConfigBackendImpl::createAuditRevision(const int index, const ServerSelector& server_selector, + const boost::posix_time::ptime& audit_ts, const std::string& log_message, const bool cascade_transaction) { // Do not touch existing audit revision in case of the cascade update. @@ -97,6 +100,7 @@ MySqlConfigBackendImpl::createAuditRevision(const int index, "audit revision"); MySqlBindingCollection in_bindings = { + MySqlBinding::createTimestamp(audit_ts), MySqlBinding::createString(tag), MySqlBinding::createString(log_message), MySqlBinding::createInteger<uint8_t>(static_cast<uint8_t>(cascade_transaction)) |