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