aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-27 11:56:50 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-27 11:56:50 +0200
commit9dd8274f4fd39bf0f3544a33e355821c56878608 (patch)
treef975eb7d80932b8dd2253d150bd2109df68b481e
parentb5379c15a2f2d2dbdcb250542331a2c477a0aeb1 (diff)
downloadodr-edilib-9dd8274f4fd39bf0f3544a33e355821c56878608.tar.gz
odr-edilib-9dd8274f4fd39bf0f3544a33e355821c56878608.tar.bz2
odr-edilib-9dd8274f4fd39bf0f3544a33e355821c56878608.zip
Fix STI input
-rw-r--r--decoder/STIWriter.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/decoder/STIWriter.cpp b/decoder/STIWriter.cpp
index 2376f51..5083c64 100644
--- a/decoder/STIWriter.cpp
+++ b/decoder/STIWriter.cpp
@@ -80,7 +80,7 @@ void STIWriter::update_sti_management(const sti_management_data& data)
void STIWriter::add_payload(sti_payload_data&& payload)
{
m_payload = move(payload);
- m_payload_valid = false;
+ m_payload_valid = true;
}
void STIWriter::update_edi_time(
@@ -106,10 +106,6 @@ void STIWriter::assemble()
throw std::logic_error("Cannot assemble STI before protocol");
}
- if (not m_stat_valid) {
- throw std::logic_error("Cannot assemble STI before STAT");
- }
-
if (not m_management_data_valid) {
throw std::logic_error("Cannot assemble STI before management data");
}