diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-04 11:26:55 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-11-04 11:26:55 +0100 |
commit | 40509399e2563798f260863df23ceef89d528c5a (patch) | |
tree | 97284958cd490cd531e17c0ce5f8823a71a8af04 /src | |
parent | b26fde93d8751f62d7ae64cd6b209181f4432c89 (diff) | |
download | dabmod-40509399e2563798f260863df23ceef89d528c5a.tar.gz dabmod-40509399e2563798f260863df23ceef89d528c5a.tar.bz2 dabmod-40509399e2563798f260863df23ceef89d528c5a.zip |
Fix segfault due to missing DPD server, init muting to false
Diffstat (limited to 'src')
-rw-r--r-- | src/output/SDR.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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<SDRDevice> 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<DPDFeedbackServer>( - m_device, - m_config.dpdFeedbackServerPort, - m_config.sampleRate); - } + m_dpd_feedback_server = make_shared<DPDFeedbackServer>( + 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) << |