summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
committerGeorge Hazan <george.hazan@gmail.com>2025-01-10 18:28:28 +0300
commit3d30ed65f9e226b7b183b23ce5dba435ec491f0b (patch)
tree512db95fca97a5b6f028ed4ca05f473cbd11190c /plugins/BasicHistory/src
parentb58bd0a705dba9a32e4db1420e2d615c6ee6bd41 (diff)
DBEVENTINFO::timestamp to become 64-bit integer
Diffstat (limited to 'plugins/BasicHistory/src')
-rw-r--r--plugins/BasicHistory/src/BinaryExport.cpp6
-rw-r--r--plugins/BasicHistory/src/DatExport.cpp4
-rw-r--r--plugins/BasicHistory/src/EventList.cpp10
-rw-r--r--plugins/BasicHistory/src/Scheduler.cpp2
4 files changed, 11 insertions, 11 deletions
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp
index 1eadefd459..8d716c7868 100644
--- a/plugins/BasicHistory/src/BinaryExport.cpp
+++ b/plugins/BasicHistory/src/BinaryExport.cpp
@@ -132,14 +132,14 @@ void BinaryExport::WriteGroup(bool, const std::wstring&, const std::wstring&, co
void BinaryExport::WriteMessage(bool, const std::wstring&, const std::wstring&, const std::wstring&, const std::wstring &message, const DBEVENTINFO& dbei)
{
- if (dbei.timestamp >= lTime) {
+ if (dbei.getUnixtime() >= lTime) {
BinaryFileMessageHeader header;
header.eventType = dbei.eventType;
header.flags = dbei.flags & (~(0x800));
- header.timestamp = dbei.timestamp;
+ header.timestamp = dbei.getUnixtime();
EXP_FILE.write((char*)&header, sizeof(BinaryFileMessageHeader));
WriteString(message);
- lTime = dbei.timestamp;
+ lTime = dbei.getUnixtime();
}
}
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp
index 9d11a75860..6ef9f857b9 100644
--- a/plugins/BasicHistory/src/DatExport.cpp
+++ b/plugins/BasicHistory/src/DatExport.cpp
@@ -97,7 +97,7 @@ void DatExport::WriteMessage(bool, const std::wstring&, const std::wstring&, con
header.cbSize = sizeof(DBEVENTINFO86);
header.eventType = dbei.eventType;
header.flags = dbei.flags & (~(0x800));
- header.timestamp = dbei.timestamp;
+ header.timestamp = dbei.getUnixtime();
header.szModule = 0;
header.pBlob = 0;
if (dbei.flags & 0x800) {
@@ -179,7 +179,7 @@ bool DatExport::GetEventList(std::vector<IImport::ExternalMessage>& eventList)
info.eventType = messageHeader.eventType;
info.flags = messageHeader.flags;
- info.timestamp = messageHeader.timestamp;
+ info.iTimestamp = messageHeader.timestamp;
info.cbBlob = messageHeader.cbBlob;
info.pBlob = (char *)memBuf.c_str();
HistoryEventList::GetObjectDescription(&info, _str, MAXSELECTSTR);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp
index 7a5ba2f3b0..e4cf87a0ba 100644
--- a/plugins/BasicHistory/src/EventList.cpp
+++ b/plugins/BasicHistory/src/EventList.cpp
@@ -63,11 +63,11 @@ bool HistoryEventList::CanShowHistory(DBEVENTINFO* dbei)
{
if (m_deltaTime != 0) {
if (m_deltaTime > 0) {
- if (m_now - m_deltaTime < dbei->timestamp)
+ if (m_now - m_deltaTime < dbei->getUnixtime())
return false;
}
else {
- if (m_now + m_deltaTime > dbei->timestamp)
+ if (m_now + m_deltaTime > dbei->getUnixtime())
return false;
}
}
@@ -501,7 +501,7 @@ void HistoryEventList::MargeMessages(const std::vector<IImport::ExternalMessage>
if (it->isExternal) {
IImport::ExternalMessage& msg = m_importedMessages[it->exIdx];
dbei.flags |= DBEF_READ;
- dbei.timestamp = msg.timestamp;
+ dbei.iTimestamp = msg.timestamp;
// For now I do not convert event data from string to blob, and event type must be message to handle it properly
dbei.eventType = EVENTTYPE_MESSAGE;
UINT cp = dbei.flags & DBEF_UTF ? CP_UTF8 : CP_ACP;
@@ -532,7 +532,7 @@ bool HistoryEventList::GetEventData(const EventIndex& ev, EventData& data)
if (db_event_get(ev.hEvent, &m_dbei) == 0) {
data.isMe = (m_dbei.flags & DBEF_SENT) != 0;
data.eventType = m_dbei.eventType;
- data.timestamp = m_dbei.timestamp;
+ data.timestamp = m_dbei.getUnixtime();
return true;
}
}
@@ -552,7 +552,7 @@ void HistoryEventList::GetExtEventDBei(const EventIndex& ev)
IImport::ExternalMessage& em = m_importedMessages[ev.exIdx];
m_dbei.flags = em.flags | 0x800;
m_dbei.eventType = em.eventType;
- m_dbei.timestamp = em.timestamp;
+ m_dbei.iTimestamp = em.timestamp;
}
HICON HistoryEventList::GetEventCoreIcon(const EventIndex& ev)
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp
index 98202c2382..e778f152a4 100644
--- a/plugins/BasicHistory/src/Scheduler.cpp
+++ b/plugins/BasicHistory/src/Scheduler.cpp
@@ -1278,7 +1278,7 @@ void DoError(const TaskOptions& to, const std::wstring _error)
DBEVENTINFO dbei = {};
dbei.szModule = MODULENAME;
dbei.flags = DBEF_UTF | DBEF_READ;
- dbei.timestamp = time(0);
+ dbei.iTimestamp = time(0);
// For now I do not convert event data from string to blob, and event type must be message to handle it properly
dbei.eventType = EVENTTYPE_MESSAGE;
int len = (int)error.length() + 1;