From 70ff8f6a3ea4dda989e07756e2ed329332298676 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 29 Jan 2016 14:45:22 +0100 Subject: Only set CLOCK_TAI if both TIST and EDI are enabled --- src/DabMultiplexer.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'src/DabMultiplexer.cpp') 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 -- cgit v1.2.3