summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-28 17:52:11 +0100
committerHarald Welte (local) <laflocal@hanuman.gnumonks.org>2009-12-28 17:52:11 +0100
commite88c531a48766eb68df14a66de5d9bf18763e6fd (patch)
tree00dcd76cc548fecd0394a93e784bccfd01793225
parentffc83a9e195eb17594e998006cec23fae569721b (diff)
ipaccess input: Print BTS number that has disappeared
-rw-r--r--openbsc/src/input/ipaccess.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index c72176657..90d7cea85 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -311,12 +311,15 @@ static int handle_ts1_read(struct bsc_fd *bfd)
msg = ipaccess_read_msg(bfd, &error);
if (!msg) {
if (error == 0) {
- LOGP(DINP, LOGL_NOTICE, "BTS disappeared, dead socket\n");
- e1inp_event(e1i_ts, EVT_E1_TEI_DN, 0, IPAC_PROTO_RSL);
- e1inp_event(e1i_ts, EVT_E1_TEI_DN, 0, IPAC_PROTO_OML);
link = e1inp_lookup_sign_link(e1i_ts, IPAC_PROTO_OML, 0);
- if (link)
+ if (link) {
link->trx->bts->ip_access.flags = 0;
+ LOGP(DINP, LOGL_NOTICE, "BTS %u disappeared, dead socket\n",
+ link->trx->bts->nr);
+ } else
+ LOGP(DINP, LOGL_NOTICE, "unknown BTS disappeared, dead socket\n");
+ e1inp_event(e1i_ts, EVT_E1_TEI_DN, 0, IPAC_PROTO_RSL);
+ e1inp_event(e1i_ts, EVT_E1_TEI_DN, 0, IPAC_PROTO_OML);
bsc_unregister_fd(bfd);
close(bfd->fd);
bfd->fd = -1;