ip.access: Keep OML/RSL up/down state per-bts for multi-BTS setups

This commit is contained in:
Harald Welte 2009-12-16 17:32:37 +01:00
parent 6739dfb705
commit 88a412ac80
2 changed files with 7 additions and 7 deletions

View File

@ -400,6 +400,7 @@ struct gsm_bts {
struct {
u_int16_t site_id;
u_int16_t bts_id;
u_int32_t flags;
} ip_access;
struct {
struct {

View File

@ -247,9 +247,8 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg,
return 0;
}
/* FIXME: this is per BTS */
static int oml_up = 0;
static int rsl_up = 0;
#define OML_UP 0x0001
#define RSL_UP 0x0002
/*
* read one ipa message from the socket
@ -348,16 +347,16 @@ static int handle_ts1_read(struct bsc_fd *bfd)
switch (link->type) {
case E1INP_SIGN_RSL:
if (!rsl_up) {
if (!(msg->trx->bts->ip_access.flags & RSL_UP)) {
e1inp_event(e1i_ts, EVT_E1_TEI_UP, link->tei, link->sapi);
rsl_up = 1;
msg->trx->bts->ip_access.flags |= RSL_UP;
}
ret = abis_rsl_rcvmsg(msg);
break;
case E1INP_SIGN_OML:
if (!oml_up) {
if (!(msg->trx->bts->ip_access.flags & OML_UP)) {
e1inp_event(e1i_ts, EVT_E1_TEI_UP, link->tei, link->sapi);
oml_up = 1;
msg->trx->bts->ip_access.flags |= OML_UP;
}
ret = abis_nm_rcvmsg(msg);
break;