always update last message update time when actively sending it
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
## Bug fixes
|
||||
* fix for numeric parsing of empty string
|
||||
* allow HTTP port query string keys without value
|
||||
* always update last message update time when actively sending it
|
||||
|
||||
## Features
|
||||
* new "read" option "-n" for retrieving name/value pairs in numeric form
|
||||
|
||||
@@ -327,6 +327,7 @@ result_t Message::prepareMaster(const unsigned char srcAddress, SymbolString& ma
|
||||
result = m_data->write(input, pt_masterData, master, (unsigned char)(m_id.size() - 2), separator);
|
||||
if (result != RESULT_OK)
|
||||
return result;
|
||||
time(&m_lastUpdateTime);
|
||||
switch (master.compareMaster(m_lastMasterData)) {
|
||||
case 1: // completely different
|
||||
m_lastChangeTime = m_lastUpdateTime;
|
||||
|
||||
@@ -305,10 +305,10 @@ private:
|
||||
/** the last seen slave data. */
|
||||
SymbolString m_lastSlaveData;
|
||||
|
||||
/** the system time when @a m_lastValue was last stored, 0 for never. */
|
||||
/** the system time when the message was last updated, 0 for never. */
|
||||
time_t m_lastUpdateTime;
|
||||
|
||||
/** the system time when @a m_lastValue was last changed, 0 for never. */
|
||||
/** the system time when the message content was last changed, 0 for never. */
|
||||
time_t m_lastChangeTime;
|
||||
|
||||
/** the number of times this messages was already polled for. */
|
||||
|
||||
Reference in New Issue
Block a user