diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-09-12 17:12:57 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-09-12 17:12:57 +0200 |
commit | 3b1faf9c91d1fd7d1bb26b744bf0a84c631806f0 (patch) | |
tree | 5a3217afbc134b999d8cd38d9acf4f2ae939d3e4 /src/TimestampDecoder.cpp | |
parent | 65afcb59dd63e22e8c7877228e21ed321a49312b (diff) | |
download | dabmod-3b1faf9c91d1fd7d1bb26b744bf0a84c631806f0.tar.gz dabmod-3b1faf9c91d1fd7d1bb26b744bf0a84c631806f0.tar.bz2 dabmod-3b1faf9c91d1fd7d1bb26b744bf0a84c631806f0.zip |
Fix incorrect usage of gmtime_r in timestamp decoder
Diffstat (limited to 'src/TimestampDecoder.cpp')
-rw-r--r-- | src/TimestampDecoder.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/TimestampDecoder.cpp b/src/TimestampDecoder.cpp index ba1a221..ddd3fb7 100644 --- a/src/TimestampDecoder.cpp +++ b/src/TimestampDecoder.cpp @@ -38,10 +38,10 @@ #define MDEBUG(fmt, args...) PDEBUG(fmt, ## args) -void TimestampDecoder::calculateTimestamp(struct frame_timestamp& ts) +void TimestampDecoder::calculateTimestamp(frame_timestamp& ts) { - std::shared_ptr<struct frame_timestamp> ts_queued = - std::make_shared<struct frame_timestamp>(); + std::shared_ptr<frame_timestamp> ts_queued = + std::make_shared<frame_timestamp>(); /* Push new timestamp into queue */ ts_queued->timestamp_valid = full_timestamp_received; @@ -115,7 +115,10 @@ void TimestampDecoder::pushMNSCData(int framephase, uint16_t mnsc) mnsc0 = (struct eti_MNSC_TIME_0*)&mnsc; enableDecode = (mnsc0->type == 0) && (mnsc0->identifier == 0); - gmtime_r(0, &temp_time); + { + const time_t timep = 0; + gmtime_r(&timep, &temp_time); + } break; case 1: |