From a436baed398aeea92fba8b02da0abd1a75b038b5 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Mon, 21 Jan 2019 15:30:22 +0100 Subject: [PATCH] fix build string for builds without valid .git folder --- srsenb/src/enb.cc | 2 +- srsepc/src/main.cc | 2 +- srsue/src/ue_base.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/srsenb/src/enb.cc b/srsenb/src/enb.cc index 6e7dd4af8..157f55209 100644 --- a/srsenb/src/enb.cc +++ b/srsenb/src/enb.cc @@ -364,7 +364,7 @@ std::string enb::get_build_mode() std::string enb::get_build_info() { - if (std::string(srslte_get_build_info()) == "") { + if (std::string(srslte_get_build_info()).find(" ") != std::string::npos) { return std::string(srslte_get_version()); } return std::string(srslte_get_build_info()); diff --git a/srsepc/src/main.cc b/srsepc/src/main.cc index ed6f7b434..1dcf1cf69 100644 --- a/srsepc/src/main.cc +++ b/srsepc/src/main.cc @@ -336,7 +336,7 @@ std::string get_build_mode() std::string get_build_info() { - if (std::string(srslte_get_build_info()) == "") { + if (std::string(srslte_get_build_info()).find(" ") != std::string::npos) { return std::string(srslte_get_version()); } return std::string(srslte_get_build_info()); diff --git a/srsue/src/ue_base.cc b/srsue/src/ue_base.cc index ed3bd4ee9..55e21f021 100644 --- a/srsue/src/ue_base.cc +++ b/srsue/src/ue_base.cc @@ -133,7 +133,7 @@ std::string ue_base::get_build_mode() std::string ue_base::get_build_info() { - if (std::string(srslte_get_build_info()) == "") { + if (std::string(srslte_get_build_info()).find(" ") != std::string::npos) { return std::string(srslte_get_version()); } return std::string(srslte_get_build_info());