diff --git a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc index e4fef62a0..00f2be229 100644 --- a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc +++ b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.cc @@ -20,6 +20,7 @@ #include "gnss_sdr_valve.h" #include #include +#include #include #if USE_GLOG_AND_GFLAGS @@ -92,10 +93,11 @@ IONGSMSSignalSource::IONGSMSSignalSource(const ConfigurationInterface* configura void IONGSMSSignalSource::load_metadata() { + metadata_ = std::make_shared(); try { GnssMetadata::XmlProcessor xml_proc; - if (!xml_proc.Load(metadata_filepath_.c_str(), false, metadata_)) + if (!xml_proc.Load(metadata_filepath_.c_str(), false, *metadata_)) { LOG(WARNING) << "Could not load XML metadata file " << metadata_filepath_; std::cerr << "Could not load XML metadata file " << metadata_filepath_ << std::endl; @@ -123,9 +125,9 @@ void IONGSMSSignalSource::load_metadata() std::vector IONGSMSSignalSource::make_stream_sources(const std::vector& stream_ids) const { std::vector sources{}; - for (const auto& file : metadata_.Files()) + for (const auto& file : metadata_->Files()) { - for (const auto& lane : metadata_.Lanes()) + for (const auto& lane : metadata_->Lanes()) { if (lane.Id() == file.Lane().Id()) { diff --git a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.h b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.h index fd0a5140c..bcdedbc3d 100644 --- a/src/algorithms/signal_source/adapters/ion_gsms_signal_source.h +++ b/src/algorithms/signal_source/adapters/ion_gsms_signal_source.h @@ -24,6 +24,7 @@ #include "ion_gsms.h" #include #include +#include #include #include @@ -69,7 +70,7 @@ private: std::vector> valves_; std::string metadata_filepath_; - GnssMetadata::Metadata metadata_; + std::shared_ptr metadata_; gnss_shared_ptr timestamp_block_; std::string timestamp_file_;