summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-29 14:45:22 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-01-29 14:45:22 +0100
commit70ff8f6a3ea4dda989e07756e2ed329332298676 (patch)
treeb11252a70c5cc23a35e2cbfeee54866138db5f82 /src
parent641a1ffdf4e6d0bddfec27b474356254214d0cb7 (diff)
downloaddabmux-70ff8f6a3ea4dda989e07756e2ed329332298676.tar.gz
dabmux-70ff8f6a3ea4dda989e07756e2ed329332298676.tar.bz2
dabmux-70ff8f6a3ea4dda989e07756e2ed329332298676.zip
Only set CLOCK_TAI if both TIST and EDI are enabled
Diffstat (limited to 'src')
-rw-r--r--src/DabMultiplexer.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/DabMultiplexer.cpp b/src/DabMultiplexer.cpp
index 28f799d..a755d99 100644
--- a/src/DabMultiplexer.cpp
+++ b/src/DabMultiplexer.cpp
@@ -248,22 +248,19 @@ void DabMultiplexer::prepare()
bool tist_enabled = m_pt.get("general.tist", false);
- try {
- m_clock_tai.get_offset();
- }
- catch (std::runtime_error& e) {
- const char* err_msg =
- "Could not initialise TAI clock properly required by "
- "EDI with timestamp. Do you have a working internet "
- "connection?";
+ if (tist_enabled and edi_conf.enabled) {
+ try {
+ m_clock_tai.get_offset();
+ }
+ catch (std::runtime_error& e) {
+ const char* err_msg =
+ "Could not initialise TAI clock properly required by "
+ "EDI with timestamp. Do you have a working internet "
+ "connection?";
- if (tist_enabled and edi_conf.enabled) {
etiLog.level(error) << err_msg;
throw e;
}
- else {
- etiLog.level(warn) << err_msg;
- }
}
#endif