ipaccess-config: Initiate missing IPA osmo_link
Since this is created by osmo-bsc, it is also expected to be there by ipaccess_drop_oml() in the shared libbsc code. But ipaccess-config was not creating it, so let's do so. Let's explicitly assert this condition in the code path expecting the pointer to be instantiated in shared code, to easily track related issues in the future. Change-Id: I3f63f6827f7c5d7a21ac125b7ca6b35244efbb65
This commit is contained in:
parent
ff1038c633
commit
b87b676fb2
|
@ -129,7 +129,7 @@ static int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin)
|
|||
{
|
||||
struct e1inp_line *line;
|
||||
struct e1inp_ts *sign_ts, *rsl_ts;
|
||||
struct e1inp_sign_link *oml_link, *rsl_link;
|
||||
struct e1inp_sign_link *oml_link, *osmo_link, *rsl_link;
|
||||
|
||||
line = talloc_zero(tall_bsc_ctx, struct e1inp_line);
|
||||
if (!line)
|
||||
|
@ -152,11 +152,14 @@ static int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin)
|
|||
/* create signalling links for TRX0 */
|
||||
oml_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OML,
|
||||
bts->c0, IPAC_PROTO_OML, 0);
|
||||
osmo_link = e1inp_sign_link_create(sign_ts, E1INP_SIGN_OSMO,
|
||||
bts->c0, IPAC_PROTO_OSMO, 0);
|
||||
rsl_link = e1inp_sign_link_create(rsl_ts, E1INP_SIGN_RSL,
|
||||
bts->c0, IPAC_PROTO_RSL, 0);
|
||||
|
||||
/* create back-links from bts/trx */
|
||||
bts->oml_link = oml_link;
|
||||
bts->osmo_link = osmo_link;
|
||||
bts->c0->rsl_link_primary = rsl_link;
|
||||
|
||||
/* default port at BTS for incoming connections is 3006 */
|
||||
|
|
|
@ -616,6 +616,7 @@ void ipaccess_drop_oml(struct gsm_bts *bts, const char *reason)
|
|||
gsm_bts_stats_reset(bts);
|
||||
|
||||
/* Also drop the associated OSMO link */
|
||||
OSMO_ASSERT(bts->osmo_link);
|
||||
e1inp_sign_link_destroy(bts->osmo_link);
|
||||
bts->osmo_link = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue