From f6f47f0320c5a18b57f1b1704a2b7c74f018bcef Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 17 Jul 2018 09:43:05 +0200 Subject: [PATCH] print srsLTE version name if no git details are found --- srsue/src/ue_base.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/srsue/src/ue_base.cc b/srsue/src/ue_base.cc index daab53936..ed3bd4ee9 100644 --- a/srsue/src/ue_base.cc +++ b/srsue/src/ue_base.cc @@ -133,15 +133,16 @@ std::string ue_base::get_build_mode() std::string ue_base::get_build_info() { + if (std::string(srslte_get_build_info()) == "") { + return std::string(srslte_get_version()); + } return std::string(srslte_get_build_info()); } std::string ue_base::get_build_string() { std::stringstream ss; - if (get_build_mode() != "" && get_build_info() != "") { - ss << "Built in " << get_build_mode() << " mode using " << get_build_info() << "." << std::endl; - } + ss << "Built in " << get_build_mode() << " mode using " << get_build_info() << "." << std::endl; return ss.str(); }