aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcu_main.cpp')
-rw-r--r--src/pcu_main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 0a370437..b27daf5d 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -184,6 +184,13 @@ int main(int argc, char *argv[])
vty_init(&pcu_vty_info);
pcu_vty_init(&gprs_log_info);
+ bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_pcu_ctx);
+ if (!bssgp_nsi) {
+ LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n");
+ return -EINVAL;
+ }
+ gprs_ns_vty_init(bssgp_nsi);
+
handle_options(argc, argv);
if ((!!spoof_mcc) + (!!spoof_mnc) == 1) {
fprintf(stderr, "--mcc and --mnc must be specified "
@@ -250,6 +257,9 @@ int main(int argc, char *argv[])
pcu_l1if_close();
+ gprs_ns_destroy(bssgp_nsi);
+ bssgp_nsi = NULL;
+
flush_timing_advance();
talloc_free(gprs_rlcmac_bts);