~aleteoryx/muditaos

f14462a147768a44525181368af5aa63dbdddc97 — Lefucjusz 1 year, 3 months ago 1767dcc
[BH-2078] Fix crash upon receiving invalid timestamp

Fix of the issue that the device would
crash and never be able to boot up
again after receiving invalid timestamp
(e.g. -1).
1 files changed, 2 insertions(+), 2 deletions(-)

M products/BellHybrid/services/db/agents/ShuffleQuoteModel.cpp
M products/BellHybrid/services/db/agents/ShuffleQuoteModel.cpp => products/BellHybrid/services/db/agents/ShuffleQuoteModel.cpp +2 -2
@@ 101,9 101,9 @@ namespace Quotes
            settings->getValue(settings::Quotes::randomQuoteIDUpdateTime, settings::SettingsScope::Global);

        try {
            lastTimestamp = stol(lastTimestampString);
            lastTimestamp = std::stoll(lastTimestampString);
        }
        catch (std::invalid_argument &e) {
        catch (const std::exception &e) {
            LOG_ERROR("Invalid timestamp, set to 0! Cause: %s", e.what());
            lastTimestamp = 0;
        }