From 40509399e2563798f260863df23ceef89d528c5a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 4 Nov 2017 11:26:55 +0100 Subject: Fix segfault due to missing DPD server, init muting to false --- src/output/SDR.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/output/SDR.cpp b/src/output/SDR.cpp index 56cb1bd..356ae4f 100644 --- a/src/output/SDR.cpp +++ b/src/output/SDR.cpp @@ -64,16 +64,14 @@ SDR::SDR(SDRDeviceConfig& config, std::shared_ptr device) : m_device(device) { // muting is remote-controllable, and reset by the GPS fix check - m_config.muting = true; + m_config.muting = false; m_device_thread = std::thread(&SDR::process_thread_entry, this); - if (m_config.dpdFeedbackServerPort != 0) { - m_dpd_feedback_server = make_shared( - m_device, - m_config.dpdFeedbackServerPort, - m_config.sampleRate); - } + m_dpd_feedback_server = make_shared( + m_device, + m_config.dpdFeedbackServerPort, + m_config.sampleRate); } SDR::~SDR() @@ -119,7 +117,9 @@ int SDR::process(Buffer *dataIn) } else { try { - m_dpd_feedback_server->set_tx_frame(frame.buf, frame.ts); + if (m_dpd_feedback_server) { + m_dpd_feedback_server->set_tx_frame(frame.buf, frame.ts); + } } catch (const runtime_error& e) { etiLog.level(warn) << -- cgit v1.2.3