aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-11 18:43:08 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-11 18:49:03 +0200
commit520656e004ca35f360c86e0b1e8caffb2ca40071 (patch)
tree60ee2bfb43bf5e944a511e44418ee7396d3d1d58 /openbsc/src/vty_interface.c
parent9dac231fe4da631e21e921c2f1db2958dee89d72 (diff)
[ipa] Handle losing the RSL/OML connection..
This is addressing multiple issues regarding the loss of the OML/RSL link to the BTS. 1.) When we lose the OML link, close down all RSL connections on all TRXs (only tested with one TRX) and free the e1inp_line allocated for the OML connection. 2.) When we lose the RSL link on any TRX and we know to which lines this connection belongs, we will close down the OML connection as we have a problem to just reactivate the RSL link. 3.) When we lose the RSL link on any TRX and we do not know where it belongs to we will free the bfd we have allocated in the rsl listen/accept method and we properly close the socket (i could not test this one properly). 4.) When we already have a bts->oml_link we will throw it away and use the new link.
Diffstat (limited to 'openbsc/src/vty_interface.c')
-rw-r--r--openbsc/src/vty_interface.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index 3c1f0ba5c..b89d633ae 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -39,6 +39,7 @@
#include <osmocore/talloc.h>
#include <openbsc/telnet_interface.h>
#include <openbsc/vty.h>
+#include <openbsc/ipaccess.h>
static struct gsm_network *gsmnet;
@@ -984,14 +985,12 @@ DEFUN(drop_bts,
/* close all connections */
- if (strcmp(argv[1], "oml") == 0) {
- if (bts->oml_link)
- close(bts->oml_link->ts->driver.ipaccess.fd.fd);
- } else if (strcmp(argv[1], "rsl") == 0) {
+ if (strcmp(argv[1], "oml") == 0)
+ ipaccess_drop_oml(bts);
+ else if (strcmp(argv[1], "rsl") == 0) {
/* close all rsl connections */
llist_for_each_entry(trx, &bts->trx_list, list) {
- if (trx->rsl_link)
- close(trx->rsl_link->ts->driver.ipaccess.fd.fd);
+ ipaccess_drop_rsl(trx);
}
} else {
vty_out(vty, "Argument must be 'oml# or 'rsl'.%s", VTY_NEWLINE);