aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-08 13:53:40 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-21 13:26:35 +0000
commitc74daf00a319b71598764ca7094dae1d2817e135 (patch)
treefea26fe7ef3c75372f6c01fc4e5d8e9fd9906490
parent33ca61346fc5bc5216cfa3838741ef76cb5c93c8 (diff)
abis_nm: Introduce new signal S_NM_GET_ATTR_REP
This signal can be used for tools willing to request and parse Attribute Response and do something with the information. ipaccess-config tool will use this signal in later patch Change-Id Ida416a969a3309868d6f4e50f34b34f224c32dd6. Related: OS#3624 Change-Id: I9a121bbfe1b96904d4e16845abc90bb6ef20d2c9
-rw-r--r--include/osmocom/bsc/signal.h1
-rw-r--r--src/osmo-bsc/abis_nm.c9
2 files changed, 8 insertions, 2 deletions
diff --git a/include/osmocom/bsc/signal.h b/include/osmocom/bsc/signal.h
index 1b351aa4a..62a3d2c88 100644
--- a/include/osmocom/bsc/signal.h
+++ b/include/osmocom/bsc/signal.h
@@ -72,6 +72,7 @@ enum signal_nm {
S_NM_STATECHG_ADM, /* Administrative State changed */
S_NM_OM2K_CONF_RES, /* OM2K Configuration Result */
S_NM_OPSTART_ACK, /* Received OPSTART ACK, arg is struct msgb *oml_msg */
+ S_NM_GET_ATTR_REP, /* Received Get Attributes Response, arg is struct msgb *oml_msg */
};
/* SS_LCHAN signals */
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index c1a26ac7f..f1306fcfb 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -616,6 +616,7 @@ static int abis_nm_rx_get_attr_resp(struct msgb *mb, const struct gsm_bts_trx *t
struct e1inp_sign_link *sign_link = mb->dst;
struct gsm_bts *bts = trx ? trx->bts : sign_link->trx->bts;
struct tlv_parsed tp;
+ int rc;
DEBUGPFOH(DNM, foh, "Get Attributes Response for BTS%u\n", bts->nr);
@@ -623,9 +624,13 @@ static int abis_nm_rx_get_attr_resp(struct msgb *mb, const struct gsm_bts_trx *t
/* nanoBTS doesn't send Get Attribute Response Info, uses its own format */
if (bts->type != GSM_BTS_TYPE_NANOBTS)
- return parse_attr_resp_info(bts, trx, foh, &tp);
+ rc = parse_attr_resp_info(bts, trx, foh, &tp);
else
- return parse_attr_resp_info_attr(bts, trx, foh, &tp);
+ rc = parse_attr_resp_info_attr(bts, trx, foh, &tp);
+
+ osmo_signal_dispatch(SS_NM, S_NM_GET_ATTR_REP, mb);
+
+ return rc;
}
/* 3GPP TS 52.021 ยง6.2.5 */