From 8c194b887b68a267fef9bfc9984040b01de3f968 Mon Sep 17 00:00:00 2001 From: David Rupprecht Date: Tue, 4 May 2021 17:43:34 +0200 Subject: [PATCH] Allow NAS init function to fail --- srsue/hdr/stack/upper/nas.h | 2 +- srsue/src/stack/upper/nas.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/srsue/hdr/stack/upper/nas.h b/srsue/hdr/stack/upper/nas.h index 37186d57d..e2d33fe33 100644 --- a/srsue/hdr/stack/upper/nas.h +++ b/srsue/hdr/stack/upper/nas.h @@ -39,7 +39,7 @@ class nas : public nas_interface_rrc, public srsran::timer_callback public: explicit nas(srsran::task_sched_handle task_sched_); virtual ~nas(); - void init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_nas* gw_, const nas_args_t& args_); + int init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_nas* gw_, const nas_args_t& args_); void stop(); void run_tti(); diff --git a/srsue/src/stack/upper/nas.cc b/srsue/src/stack/upper/nas.cc index 204d68893..3633e70e6 100644 --- a/srsue/src/stack/upper/nas.cc +++ b/srsue/src/stack/upper/nas.cc @@ -46,7 +46,7 @@ nas::nas(srsran::task_sched_handle task_sched_) : logger(srslog::fetch_basic_logger("NAS")) {} -void nas::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_nas* gw_, const nas_args_t& cfg_) +int nas::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_nas* gw_, const nas_args_t& cfg_) { usim = usim_; rrc = rrc_; @@ -105,6 +105,7 @@ void nas::init(usim_interface_nas* usim_, rrc_interface_nas* rrc_, gw_interface_ } running = true; + return SRSRAN_SUCCESS; } nas::~nas() {}