diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-05-25 03:10:51 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2019-05-25 05:56:32 +0200 |
commit | eb64d43922f48901ea4fc872b5c2d65b9e334221 (patch) | |
tree | e9e135c30ff73156be9334d9d3402d70951b65cb | |
parent | 41d6b35670efe87d91d509d5b1df8b06292fe73e (diff) |
gprs_bssgp_pcu: make gprs_bssgp_ns_cb public
rename the function sgsn_ns_cb -> gprs_bssgp_ns_cb.
To allow writing and reading the same configuration, the pcu needs to register
all vty commands before reading the configuration. This callback
is required to register NS based vty commands
Related: OS#4024
Change-Id: I440c0df2e32fe22bf43288c00bb4aa3a0c6a3a51
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 4 | ||||
-rw-r--r-- | src/gprs_bssgp_pcu.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 9d02df6b..50f10db9 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -520,7 +520,7 @@ int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx) return 0; } -static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, struct msgb *msg, uint16_t bvci) { int rc = 0; switch (event) { @@ -913,7 +913,7 @@ struct gprs_bssgp_pcu *gprs_bssgp_create_and_connect(struct gprs_rlcmac_bts *bts the_pcu.bts = bts; - bssgp_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_pcu_ctx); + bssgp_nsi = gprs_ns_instantiate(&gprs_bssgp_ns_cb, tall_pcu_ctx); if (!bssgp_nsi) { LOGP(DBSSGP, LOGL_ERROR, "Failed to create NS instance\n"); return NULL; diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h index e8ae1a9c..f98e7196 100644 --- a/src/gprs_bssgp_pcu.h +++ b/src/gprs_bssgp_pcu.h @@ -80,6 +80,9 @@ struct gprs_bssgp_pcu *gprs_bssgp_create_and_connect(struct gprs_rlcmac_bts *bts uint16_t nsvci, uint16_t bvci, uint16_t mcc, uint16_t mnc, bool mnc_3_digits, uint16_t lac, uint16_t rac, uint16_t cell_id); +int gprs_bssgp_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, + struct msgb *msg, uint16_t bvci); + void gprs_bssgp_destroy(void); struct bssgp_bvc_ctx *gprs_bssgp_pcu_current_bctx(void); |