aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-11-04 11:26:55 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-11-04 11:26:55 +0100
commit40509399e2563798f260863df23ceef89d528c5a (patch)
tree97284958cd490cd531e17c0ce5f8823a71a8af04
parentb26fde93d8751f62d7ae64cd6b209181f4432c89 (diff)
downloaddabmod-40509399e2563798f260863df23ceef89d528c5a.tar.gz
dabmod-40509399e2563798f260863df23ceef89d528c5a.tar.bz2
dabmod-40509399e2563798f260863df23ceef89d528c5a.zip
Fix segfault due to missing DPD server, init muting to false
-rw-r--r--TODO2
-rw-r--r--src/output/SDR.cpp16
2 files changed, 9 insertions, 9 deletions
diff --git a/TODO b/TODO
index 9253cab..343dad1 100644
--- a/TODO
+++ b/TODO
@@ -15,7 +15,7 @@ This would enable SFN support with LimeSDR devices.
Move dpd port from uhd section to somewhere else.
-Clean up and separate GPS and refclk checks.
+Clean up and separate GPS and refclk checks. Ensure muting is set properly at startup.
Add antenna selection to config.
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) <<